(()=>{var Xu=Object.create;var wt=Object.defineProperty,Qu=Object.defineProperties,ro=Object.getOwnPropertyDescriptor,ed=Object.getOwnPropertyDescriptors,td=Object.getOwnPropertyNames,pn=Object.getOwnPropertySymbols,rd=Object.getPrototypeOf,Ts=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable;var io=(r,e,t)=>e in r?wt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,g=(r,e)=>{for(var t in e||(e={}))Ts.call(e,t)&&io(r,t,e[t]);if(pn)for(var t of pn(e))no.call(e,t)&&io(r,t,e[t]);return r},O=(r,e)=>Qu(r,ed(e)),nd=r=>wt(r,"__esModule",{value:!0}),s=(r,e)=>wt(r,"name",{value:e,configurable:!0});var vt=(r,e)=>{var t={};for(var n in r)Ts.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&pn)for(var n of pn(r))e.indexOf(n)<0&&no.call(r,n)&&(t[n]=r[n]);return t};var v=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var id=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of td(e))!Ts.call(r,n)&&n!=="default"&&wt(r,n,{get:()=>e[n],enumerable:!(t=ro(e,n))||t.enumerable});return r},E=r=>id(nd(wt(r!=null?Xu(rd(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r),qe=(r,e,t,n)=>{for(var i=n>1?void 0:n?ro(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&wt(e,t,i),i};var b=(r,e,t)=>new Promise((n,i)=>{var a=l=>{try{c(t.next(l))}catch(f){i(f)}},o=l=>{try{c(t.throw(l))}catch(f){i(f)}},c=l=>l.done?n(l.value):Promise.resolve(l.value).then(a,o);c((t=t.apply(r,e)).next())});var k=v((Gy,yn)=>{var so,ao,oo,co,lo,uo,po,fo,mo,fn,Os,yo,go,ho,St,bo,wo,vo,So,xo,Do,Co,Po,Ao,mn;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&undefined?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof yn=="object"&&typeof yn.exports=="object"?r(t(e,t(yn.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(a,o){return n[a]=i?i(a,o):o}}s(t,"createExporter")})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])};so=s(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function a(){this.constructor=n}s(a,"__"),n.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)},"__extends"),ao=Object.assign||function(n){for(var i,a=1,o=arguments.length;a=0;h--)(f=n[h])&&(l=(c<3?f(l):c>3?f(i,a,l):f(i,a))||l);return c>3&&l&&Object.defineProperty(i,a,l),l},"__decorate"),lo=s(function(n,i){return function(a,o){i(a,o,n)}},"__param"),uo=s(function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},"__metadata"),po=s(function(n,i,a,o){function c(l){return l instanceof a?l:new a(function(f){f(l)})}return s(c,"adopt"),new(a||(a=Promise))(function(l,f){function h(T){try{w(o.next(T))}catch(J){f(J)}}s(h,"fulfilled");function P(T){try{w(o.throw(T))}catch(J){f(J)}}s(P,"rejected");function w(T){T.done?l(T.value):c(T.value).then(h,P)}s(w,"step"),w((o=o.apply(n,i||[])).next())})},"__awaiter"),fo=s(function(n,i){var a={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},o,c,l,f;return f={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function h(w){return function(T){return P([w,T])}}function P(w){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,c&&(l=w[0]&2?c.return:w[0]?c.throw||((l=c.return)&&l.call(c),0):c.next)&&!(l=l.call(c,w[1])).done)return l;switch(c=0,l&&(w=[w[0]&2,l.value]),w[0]){case 0:case 1:l=w;break;case 4:return a.label++,{value:w[1],done:!1};case 5:a.label++,c=w[1],w=[0];continue;case 7:w=a.ops.pop(),a.trys.pop();continue;default:if(l=a.trys,!(l=l.length>0&&l[l.length-1])&&(w[0]===6||w[0]===2)){a=0;continue}if(w[0]===3&&(!l||w[1]>l[0]&&w[1]=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},"__values"),Os=s(function(n,i){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),c,l=[],f;try{for(;(i===void 0||i-- >0)&&!(c=o.next()).done;)l.push(c.value)}catch(h){f={error:h}}finally{try{c&&!c.done&&(a=o.return)&&a.call(o)}finally{if(f)throw f.error}}return l},"__read"),yo=s(function(){for(var n=[],i=0;i1||h(F,Le)})})}function h(F,Le){try{P(o[F](Le))}catch(bt){J(l[0][3],bt)}}function P(F){F.value instanceof St?Promise.resolve(F.value.v).then(w,T):J(l[0][2],F)}function w(F){h("next",F)}function T(F){h("throw",F)}function J(F,Le){F(Le),l.shift(),l.length&&h(l[0][0],l[0][1])}},"__asyncGenerator"),wo=s(function(n){var i,a;return i={},o("next"),o("throw",function(c){throw c}),o("return"),i[Symbol.iterator]=function(){return this},i;function o(c,l){i[c]=n[c]?function(f){return(a=!a)?{value:St(n[c](f)),done:c==="return"}:l?l(f):f}:l}},"__asyncDelegator"),vo=s(function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],a;return i?i.call(n):(n=typeof fn=="function"?fn(n):n[Symbol.iterator](),a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a);function o(l){a[l]=n[l]&&function(f){return new Promise(function(h,P){f=n[l](f),c(h,P,f.done,f.value)})}}function c(l,f,h,P){Promise.resolve(P).then(function(w){l({value:w,done:h})},f)}},"__asyncValues"),So=s(function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n},"__makeTemplateObject");var t=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};xo=s(function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var a in n)a!=="default"&&Object.prototype.hasOwnProperty.call(n,a)&&mn(i,n,a);return t(i,n),i},"__importStar"),Do=s(function(n){return n&&n.__esModule?n:{default:n}},"__importDefault"),Co=s(function(n,i,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!o:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(n):o?o.value:i.get(n)},"__classPrivateFieldGet"),Po=s(function(n,i,a,o,c){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!c)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!c:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?c.call(n,a):c?c.value=a:i.set(n,a),a},"__classPrivateFieldSet"),Ao=s(function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},"__classPrivateFieldIn"),r("__extends",so),r("__assign",ao),r("__rest",oo),r("__decorate",co),r("__param",lo),r("__metadata",uo),r("__awaiter",po),r("__generator",fo),r("__exportStar",mo),r("__createBinding",mn),r("__values",fn),r("__read",Os),r("__spread",yo),r("__spreadArrays",go),r("__spreadArray",ho),r("__await",St),r("__asyncGenerator",bo),r("__asyncDelegator",wo),r("__asyncValues",vo),r("__makeTemplateObject",So),r("__importStar",xo),r("__importDefault",Do),r("__classPrivateFieldGet",Co),r("__classPrivateFieldSet",Po),r("__classPrivateFieldIn",Ao)})});var wr=v(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.compose=xt.CompositeTransducer=void 0;var gn=class{constructor(e,t){this.a=e,this.b=t}async_(e){return this.b.async_(this.a.async_(e))}sync(e){return this.b.sync(this.a.sync(e))}};s(gn,"CompositeTransducer");xt.CompositeTransducer=gn;function sd(r,e){return new gn(r,e)}s(sd,"compose");xt.compose=sd});var To=v(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.decompose=void 0;var ad=wr();function*Rs(r){r instanceof ad.CompositeTransducer?(yield*Rs(r.a),yield*Rs(r.b)):yield r}s(Rs,"decompose");hn.decompose=Rs});var Q=v(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.syncReturned=C.asyncReturned=C.isReturned=C.isYielded=C.AsyncIteratorHandler=C.by=C.toAsyncIterable=C.isArrayLike=C.asyncIterable=C.iterable=C.toIterable=C.isPromiseLike=C.isAsyncIterable=C.isIterable=C.value=C.key=C.comparators=C.descending=C.ascending=void 0;var ze=k();function bn(r,e){return re?1:0}s(bn,"ascending");C.ascending=bn;function od(r,e){return re?-1:0}s(od,"descending");C.descending=od;function cd(...r){return(e,t)=>{for(let n of r){let i=n(e,t);if(i!=0)return i}return 0}}s(cd,"comparators");C.comparators=cd;function ld(r){return Object.assign(e=>e[r],{name:r})}s(ld,"key");C.key=ld;function ud(r){return e=>e[r]}s(ud,"value");C.value=ud;function dd(r){return typeof r=="object"&&Symbol.iterator in r}s(dd,"isIterable");C.isIterable=dd;function pd(r){return typeof r=="object"&&Symbol.asyncIterator in r}s(pd,"isAsyncIterable");C.isAsyncIterable=pd;function fd(r){return typeof r=="object"&&"then"in r}s(fd,"isPromiseLike");C.isPromiseLike=fd;function md(...r){return r}s(md,"toIterable");C.toIterable=md;function*yd(r){for(let e=0;ee(t[r],n[r])}s(vd,"byKey");function Sd(r,e=bn){return(t,n)=>e(r(t),r(n))}s(Sd,"byFn");var ks=class{constructor(){this.handlers=[],this.state=[]}value(e){this.newState({value:e,done:!1})}error(e){this.newState(e)}close(e){this.newState({value:e,done:!0})}[Symbol.asyncIterator](){return this}next(){return new Promise((e,t)=>{this.newHandler([e,t])})}newState(e){let t=this.handlers.shift();if(typeof t=="undefined")return this.state.push(e);let n=this.state.shift();if(typeof n=="undefined")return this.consume(e,t);this.consume(n,t),this.newState(e)}newHandler(e){let t=this.state.shift();if(typeof t=="undefined")return this.handlers.push(e);let n=this.handlers.shift();if(typeof n=="undefined")return this.consume(t,e);this.consume(t,n),this.newHandler(e)}consume(e,[t,n]){e instanceof Error?n(e):t(e)}};s(ks,"AsyncIteratorHandler");C.AsyncIteratorHandler=ks;function xd(r){return r&&typeof r=="object"&&"yielded"in r}s(xd,"isYielded");C.isYielded=xd;function Dd(r){return r&&typeof r=="object"&&"returned"in r}s(Dd,"isReturned");C.isReturned=Dd;function Cd(r){return ze.__asyncGenerator(this,arguments,s(function*(){for(;;){let{value:t,done:n}=yield ze.__await(r.next());if(n){yield yield ze.__await({returned:t});break}else yield yield ze.__await({yielded:t})}},"asyncReturned_1"))}s(Cd,"asyncReturned");C.asyncReturned=Cd;function*Pd(r){for(;;){let{value:e,done:t}=r.next();if(t){yield{returned:e};break}else yield{yielded:e}}}s(Pd,"syncReturned");C.syncReturned=Pd});var Oo=v(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.dedupe=Ct.DedupeTransducer=void 0;var Dt=k(),Ad=Q(),wn=class{constructor(e){this.comparator=e}async_(e){return Dt.__asyncGenerator(this,arguments,s(function*(){var n,i;let a;try{for(var o=Dt.__asyncValues(e),c;c=yield Dt.__await(o.next()),!c.done;){let l=c.value;typeof a=="undefined"?yield yield Dt.__await(l):this.comparator(l,a)!==0&&(yield yield Dt.__await(l)),a=l}}catch(l){n={error:l}}finally{try{c&&!c.done&&(i=o.return)&&(yield Dt.__await(i.call(o)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){let t;for(let n of e)typeof t=="undefined"?yield n:this.comparator(n,t)!==0&&(yield n),t=n}};s(wn,"DedupeTransducer");Ct.DedupeTransducer=wn;function Td(r=Ad.ascending){return new wn(r)}s(Td,"dedupe");Ct.dedupe=Td});var Ro=v(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.drop=Pt.DropTransducer=void 0;var vr=k(),vn=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return vr.__asyncGenerator(this,arguments,s(function*(){var n,i;try{for(var a=vr.__asyncValues(e),o;o=yield vr.__await(a.next()),!o.done;){let c=o.value;--this.count<0&&(yield yield vr.__await(c))}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&(yield vr.__await(i.call(a)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){for(let t of e)--this.count<0&&(yield t)}};s(vn,"DropTransducer");Pt.DropTransducer=vn;function Od(r){return new vn(r)}s(Od,"drop");Pt.drop=Od});var ko=v(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.dropWhile=At.DropWhileTransducer=void 0;var Sr=k(),Sn=class{constructor(e){this.predicate=e}async_(e){return Sr.__asyncGenerator(this,arguments,s(function*(){var n,i;let a=!0;try{for(var o=Sr.__asyncValues(e),c;c=yield Sr.__await(o.next()),!c.done;){let l=c.value;a&&(a=this.predicate(l)),a||(yield yield Sr.__await(l))}}catch(l){n={error:l}}finally{try{c&&!c.done&&(i=o.return)&&(yield Sr.__await(i.call(o)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){let t=!0;for(let n of e)t&&(t=this.predicate(n)),t||(yield n)}};s(Sn,"DropWhileTransducer");At.DropWhileTransducer=Sn;function Rd(r){return new Sn(r)}s(Rd,"dropWhile");At.dropWhile=Rd});var Dn=v(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.accept=We.filter=We.FilterTransducer=void 0;var xr=k(),xn=class{constructor(e){this.predicate=e}async_(e){return xr.__asyncGenerator(this,arguments,s(function*(){var n,i;try{for(var a=xr.__asyncValues(e),o;o=yield xr.__await(a.next()),!o.done;){let c=o.value;this.predicate(c)&&(yield yield xr.__await(c))}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&(yield xr.__await(i.call(a)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){for(let t of e)this.predicate(t)&&(yield t)}};s(xn,"FilterTransducer");We.FilterTransducer=xn;function Eo(r){return new xn(r)}s(Eo,"filter");We.filter=Eo;We.accept=Eo});var Es=v(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.first=Ot.FirstTransducer=void 0;var Tt=k(),Cn=class{async_(e){return Tt.__asyncGenerator(this,arguments,s(function*(){var n,i;try{for(var a=Tt.__asyncValues(e),o;o=yield Tt.__await(a.next()),!o.done;){let c=o.value;return yield Tt.__await(yield yield Tt.__await(c))}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&(yield Tt.__await(i.call(a)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){for(let t of e)return yield t}};s(Cn,"FirstTransducer");Ot.FirstTransducer=Cn;function kd(){return new Cn}s(kd,"first");Ot.first=kd});var Mo=v(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.find=void 0;var Ed=Dn(),Md=Es(),Id=wr();function _d(r){return(0,Id.compose)((0,Ed.filter)(r),(0,Md.first)())}s(_d,"find");Pn.find=_d});var Io=v(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.flatMap=Rt.FlatMapTransducer=void 0;var st=k(),An=class{constructor(e){this.mapper=e}async_(e){return st.__asyncGenerator(this,arguments,s(function*(){var n,i;try{for(var a=st.__asyncValues(e),o;o=yield st.__await(a.next()),!o.done;){let c=o.value;yield st.__await(yield*st.__asyncDelegator(st.__asyncValues(this.mapper(c))))}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&(yield st.__await(i.call(a)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){for(let t of e)yield*this.mapper(t)}};s(An,"FlatMapTransducer");Rt.FlatMapTransducer=An;function Fd(r){return new An(r)}s(Fd,"flatMap");Rt.flatMap=Fd});var Fo=v(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.transducer=Ve.identity=Ve.IdentityTransducer=void 0;var Tn=class{async_(e){return e}sync(e){return e}};s(Tn,"IdentityTransducer");Ve.IdentityTransducer=Tn;function _o(){return new Tn}s(_o,"identity");Ve.identity=_o;Ve.transducer=_o});var Ms=v(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.last=kt.LastTransducer=void 0;var Dr=k(),On=class{async_(e){return Dr.__asyncGenerator(this,arguments,s(function*(){var n,i;let a;try{for(var o=Dr.__asyncValues(e),c;c=yield Dr.__await(o.next()),!c.done;)a=c.value}catch(l){n={error:l}}finally{try{c&&!c.done&&(i=o.return)&&(yield Dr.__await(i.call(o)))}finally{if(n)throw n.error}}a!==void 0&&(yield yield Dr.__await(a))},"async_1"))}*sync(e){let t;for(t of e);t!==void 0&&(yield t)}};s(On,"LastTransducer");kt.LastTransducer=On;function jd(){return new On}s(jd,"last");kt.last=jd});var jo=v(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.map=Et.MapTransducer=void 0;var Cr=k(),Rn=class{constructor(e){this.mapper=e}async_(e){return Cr.__asyncGenerator(this,arguments,s(function*(){var n,i;try{for(var a=Cr.__asyncValues(e),o;o=yield Cr.__await(a.next()),!o.done;){let c=o.value;yield yield Cr.__await(this.mapper(c))}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&(yield Cr.__await(i.call(a)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){for(let t of e)yield this.mapper(t)}};s(Rn,"MapTransducer");Et.MapTransducer=Rn;function Ld(r){return new Rn(r)}s(Ld,"map");Et.map=Ld});var Is=v(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.scan=It.ScanTransducer=void 0;var Mt=k(),kn=class{constructor(e,t){this.reducer=e,this.seed=t}async_(e){return Mt.__asyncGenerator(this,arguments,s(function*(){var n,i;let a=this.seed;yield yield Mt.__await(a);try{for(var o=Mt.__asyncValues(e),c;c=yield Mt.__await(o.next()),!c.done;){let l=c.value;yield yield Mt.__await(a=this.reducer(a,l))}}catch(l){n={error:l}}finally{try{c&&!c.done&&(i=o.return)&&(yield Mt.__await(i.call(o)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){let t=this.seed;yield t;for(let n of e)yield t=this.reducer(t,n)}};s(kn,"ScanTransducer");It.ScanTransducer=kn;function qd(r,e){return new kn(r,e)}s(qd,"scan");It.scan=qd});var Lo=v(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.reduce=void 0;var Hd=wr(),Kd=Ms(),Ud=Is();function Bd(r,e){return(0,Hd.compose)((0,Ud.scan)(r,e),(0,Kd.last)())}s(Bd,"reduce");En.reduce=Bd});var qo=v(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.reject=void 0;var $d=Dn();function Gd(r){return new $d.FilterTransducer(e=>!r(e))}s(Gd,"reject");Mn.reject=Gd});var _s=v(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.sum=Oe.subtract=Oe.add=Oe.increment=void 0;function Nd(r){return r+1}s(Nd,"increment");Oe.increment=Nd;function zd(r,e){return e===void 0?t=>r+t:r+e}s(zd,"add");Oe.add=zd;function Wd(r,e){return e===void 0?t=>t-r:r-e}s(Wd,"subtract");Oe.subtract=Wd;var Vd=s((r,e)=>r+e,"sum");Oe.sum=Vd});var _t=v(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.AsyncSequence=re.Sequence=re.sequence=re.range=re.repeat=re.iterate=void 0;var Fs=_s(),js=Q(),Ho=G();function*In(r,e){for(;;)yield e,e=r(e)}s(In,"iterate");re.iterate=In;function*Jd(r){for(;;)yield r()}s(Jd,"repeat");re.repeat=Jd;function*Yd(r,e,t=1){if(t===0)throw new Error("step can not be 0");if(e===void 0)yield*In((0,Fs.add)(t),r);else{let n=Math.abs(t);ei>=e)):yield*Ls(In((0,Fs.add)(n),r),(0,Ho.takeWhile)(i=>i<=e))}}s(Yd,"range");re.range=Yd;function Ls(r,...e){return(0,js.isIterable)(r)?new Pr(r,e):(0,js.isArrayLike)(r)?new Pr((0,js.iterable)(r),e):new _n(r,e)}s(Ls,"sequence");re.sequence=Ls;var Pr=class{constructor(e,t){this.source=e,this.transducers=t}[Symbol.iterator](){return this.transducers.reduce((e,t)=>t.sync(e),this.source)[Symbol.iterator]()}};s(Pr,"Sequence");re.Sequence=Pr;var _n=class{constructor(e,t){this.source=e,this.transducers=t}[Symbol.asyncIterator](){return this.transducers.reduce((e,t)=>t.async_(e),this.source)[Symbol.asyncIterator]()}};s(_n,"AsyncSequence");re.AsyncSequence=_n});var Bo=v(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.single=void 0;var Ko=k(),Zd=Q(),Uo=_t();function Xd(r,...e){return(0,Zd.isIterable)(r)?Qd((0,Uo.sequence)(r,...e)):ep((0,Uo.sequence)(r,...e))}s(Xd,"single");Fn.single=Xd;function Qd(r){for(let e of r)return e;throw new Error("Expected a single value")}s(Qd,"toSingle");function ep(r){var e,t,n,i;return Ko.__awaiter(this,void 0,void 0,function*(){try{for(e=Ko.__asyncValues(r);t=yield e.next(),!t.done;)return t.value}catch(a){n={error:a}}finally{try{t&&!t.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}throw new Error("Expected a single value")})}s(ep,"toSinglePromise")});var ne=v(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.array=void 0;var $o=k(),Go=Q(),No=_t();function tp(r,...e){return(0,Go.isIterable)(r)||(0,Go.isArrayLike)(r)?rp((0,No.sequence)(r,...e)):np((0,No.sequence)(r,...e))}s(tp,"array");jn.array=tp;function rp(r){let e=[];for(let t of r)e.push(t);return e}s(rp,"toArray");function np(r){var e,t,n,i;return $o.__awaiter(this,void 0,void 0,function*(){let a=[];try{for(e=$o.__asyncValues(r);t=yield e.next(),!t.done;){let o=t.value;a.push(o)}}catch(o){n={error:o}}finally{try{t&&!t.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}return a})}s(np,"toPromiseArray")});var Wo=v(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.sort=Ft.SortTransducer=void 0;var Ar=k(),ip=Q(),zo=ne(),Ln=class{constructor(e){this.comparator=e}async_(e){return Ar.__asyncGenerator(this,arguments,s(function*(){let n=yield Ar.__await((0,zo.array)(e));n.sort(this.comparator),yield Ar.__await(yield*Ar.__asyncDelegator(Ar.__asyncValues(n)))},"async_1"))}*sync(e){let t=(0,zo.array)(e);t.sort(this.comparator),yield*t}};s(Ln,"SortTransducer");Ft.SortTransducer=Ln;function sp(r=ip.ascending){return new Ln(r)}s(sp,"sort");Ft.sort=sp});var Vo=v(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.take=jt.TakeTransducer=void 0;var at=k(),qn=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return at.__asyncGenerator(this,arguments,s(function*(){var n,i;if(this.count<1)return yield at.__await(void 0);try{for(var a=at.__asyncValues(e),o;o=yield at.__await(a.next()),!o.done;){let c=o.value;if(yield yield at.__await(c),--this.count<1)return yield at.__await(void 0)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&(yield at.__await(i.call(a)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){if(!(this.count<1)){for(let t of e)if(yield t,--this.count<1)return}}};s(qn,"TakeTransducer");jt.TakeTransducer=qn;function ap(r){return new qn(r)}s(ap,"take");jt.take=ap});var Jo=v(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.takeWhile=qt.TakeWhileTransducer=void 0;var Lt=k(),Hn=class{constructor(e){this.predicate=e}async_(e){return Lt.__asyncGenerator(this,arguments,s(function*(){var n,i;try{for(var a=Lt.__asyncValues(e),o;o=yield Lt.__await(a.next()),!o.done;){let c=o.value;if(this.predicate(c))yield yield Lt.__await(c);else return yield Lt.__await(void 0)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&(yield Lt.__await(i.call(a)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){for(let t of e)if(this.predicate(t))yield t;else return}};s(Hn,"TakeWhileTransducer");qt.TakeWhileTransducer=Hn;function op(r){return new Hn(r)}s(op,"takeWhile");qt.takeWhile=op});var Zo=v(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0})});var He=v(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.container=Je.lazy=Je.replace=void 0;function Xo(r,e,t){return Object.defineProperty(r,e,{value:t})}s(Xo,"replace");Je.replace=Xo;function Qo(r,e,t){if(typeof t.get=="undefined")throw new Error("@lazy can only decorate getter methods");return Object.defineProperty(r,e,Object.assign(Object.assign({},t),{get(){return Xo(this,e,t.get.call(this))[e]}}))}s(Qo,"lazy");Je.lazy=Qo;function cp(r){return Object.keys(r).reduce((e,t)=>Qo(e,t,{configurable:!0,get:()=>r[t](e)}),{})}s(cp,"container");Je.container=cp});var Ks=v(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.AVLTree=void 0;var ec=k(),Kn=Q(),tc=He(),ge=class{constructor(e){this.comparator=e}static empty(e=Kn.ascending){return new qs(e)}static create(e,t,n=Kn.ascending){let i=ge.empty(n);return new oe(n,e,t,i,i)}static of(e,t=Kn.ascending){return ge.preSorted(e.sort((0,Kn.by)(0)),t,ge.empty(t))}static preSorted(e,t,n){let i=e.length;switch(i){case 0:return n;case 1:{let[[a,o]]=e;return new oe(t,a,o,n,n)}default:{let a=Math.floor(i/2),o=ge.preSorted(e.slice(0,a),t,n),c=ge.preSorted(e.slice(a+1),t,n),[l,f]=e[a];return new oe(t,l,f,o,c)}}}};s(ge,"AVLTree");Un.AVLTree=ge;var qs=class extends ge{constructor(e){super(e);this.isEmpty=!0,this.height=0,this.balance=0}insert(e,t){return new oe(this.comparator,e,t,this,this)}contains(e){return!1}lookup(e){}delete(e){return{tree:this}}first(){}last(){}removeFirst(){return{tree:this}}removeLast(){return{tree:this}}toString(){return""}*keys(){}*values(){}*entries(){return[]}};s(qs,"Empty");var oe=class extends ge{constructor(e,t,n,i,a){super(e);this.key=t,this.value=n,this.left=i,this.right=a,this.isEmpty=!1}insert(e,t){let n=this.comparator(e,this.key);return n===0?new oe(this.comparator,e,t,this.left,this.right):n<0?this.replaceLeft(this.left.insert(e,t)):this.replaceRight(this.right.insert(e,t))}contains(e){let t=this.comparator(e,this.key);return t===0?!0:t<0?this.left.contains(e):this.right.contains(e)}lookup(e){let t=this.comparator(e,this.key);return t===0?this.value:t<0?this.left.lookup(e):this.right.lookup(e)}delete(e){let t=this.comparator(e,this.key);if(t===0){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:o,key:c,value:l}=this.left.removeLast();return{tree:Hs(new oe(this.comparator,c,l,o,this.right)),key:this.key,value:this.value}}if(t<0){let{tree:o,key:c,value:l}=this.left.delete(e);return{tree:this.replaceLeft(o),key:c,value:l}}let{tree:n,key:i,value:a}=this.right.delete(e);return{tree:this.replaceRight(n),key:i,value:a}}first(){return this.left.isEmpty?this.value:this.left.first()}last(){return this.right.isEmpty?this.value:this.right.last()}removeFirst(){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};let{tree:e,key:t,value:n}=this.left.removeFirst();return{tree:this.replaceLeft(e),key:t,value:n}}removeLast(){if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:e,key:t,value:n}=this.right.removeLast();return{tree:this.replaceRight(e),key:t,value:n}}replaceLeft(e){return Hs(new oe(this.comparator,this.key,this.value,e,this.right))}replaceRight(e){return Hs(new oe(this.comparator,this.key,this.value,this.left,e))}toString(){return`(${this.left} ${this.key}=${this.value} ${this.right})`}get balance(){return this.left.height-this.right.height}get height(){return Math.max(this.left.height,this.right.height)+1}*keys(){yield*this.left.keys(),yield this.key,yield*this.right.keys()}*values(){yield*this.left.values(),yield this.value,yield*this.right.values()}*entries(){yield*this.left.entries(),yield[this.key,this.value],yield*this.right.entries()}};s(oe,"Node");ec.__decorate([tc.lazy],oe.prototype,"balance",null);ec.__decorate([tc.lazy],oe.prototype,"height",null);function Hs(r){let e=r.balance;return e==-2?up(r):e==2?lp(r):r}s(Hs,"balance");function lp(r){let e=r.left.balance;return e==-1?dp(r):e==1?rc(r):r}s(lp,"balanceLeft");function up(r){let e=r.right.balance;return e==1?pp(r):e==-1?nc(r):r}s(up,"balanceRight");function rc(r){return sc(r)}s(rc,"balanceLeftLeft");function dp(r){let e=ic(r.left);return rc(r.replaceLeft(e))}s(dp,"balanceLeftRight");function nc(r){return ic(r)}s(nc,"balanceRightRight");function pp(r){let e=sc(r.right);return nc(r.replaceRight(e))}s(pp,"balanceRightLeft");function ic(r){let e=r.right,t=e.left,n=r.replaceRight(t);return e.replaceLeft(n)}s(ic,"rotateLeft");function sc(r){let e=r.left,t=e.right,n=r.replaceLeft(t);return e.replaceRight(n)}s(sc,"rotateRight")});var oc=v(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.unique=Ht.UniqueTransducer=void 0;var Tr=k(),fp=Q(),ac=Ks(),Bn=class{constructor(e){this.comparator=e}async_(e){return Tr.__asyncGenerator(this,arguments,s(function*(){var n,i;let a=ac.AVLTree.empty(this.comparator);try{for(var o=Tr.__asyncValues(e),c;c=yield Tr.__await(o.next()),!c.done;){let l=c.value;a.contains(l)||(a=a.insert(l,void 0),yield yield Tr.__await(l))}}catch(l){n={error:l}}finally{try{c&&!c.done&&(i=o.return)&&(yield Tr.__await(i.call(o)))}finally{if(n)throw n.error}}},"async_1"))}*sync(e){let t=ac.AVLTree.empty(this.comparator);for(let n of e)t.contains(n)||(t=t.insert(n,void 0),yield n)}};s(Bn,"UniqueTransducer");Ht.UniqueTransducer=Bn;function mp(r=fp.ascending){return new Bn(r)}s(mp,"unique");Ht.unique=mp});var cc=v(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.WindowedTransducer=Ut.windowed=void 0;var Kt=k();function yp(r,e=1,t=!1){return new $n(r,e,t)}s(yp,"windowed");Ut.windowed=yp;var $n=class{constructor(e,t,n){this.size=e,this.step=t,this.remainder=n}async_(e){return Kt.__asyncGenerator(this,arguments,s(function*(){var n,i;let a=[],o=0;try{for(var c=Kt.__asyncValues(e),l;l=yield Kt.__await(c.next()),!l.done;){let f=l.value;if(o>0){o--;continue}a.push(f),a.length===this.size&&(yield yield Kt.__await([...a]),a=a.slice(this.step),this.step>this.size&&(o=this.step-this.size))}}catch(f){n={error:f}}finally{try{l&&!l.done&&(i=c.return)&&(yield Kt.__await(i.call(c)))}finally{if(n)throw n.error}}this.remainder&&(yield yield Kt.__await([...a]))},"async_1"))}*sync(e){let t=[],n=0;for(let i of e){if(n>0){n--;continue}t.push(i),t.length===this.size&&(yield[...t],t=t.slice(this.step),this.step>this.size&&(n=this.step-this.size))}this.remainder&&(yield[...t])}};s($n,"WindowedTransducer");Ut.WindowedTransducer=$n});var uc=v(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.zipWithIndex=Ye.zip=Ye.ZipTransducer=void 0;var Gn=k(),lc=Q(),gp=_t(),Or=class{constructor(e){this.other=e}async_(e){return Gn.__asyncGenerator(this,arguments,s(function*(){if(!(0,lc.isAsyncIterable)(this.other))throw new Error("Unsupported operation exception");let n=e[Symbol.asyncIterator](),i=this.other[Symbol.asyncIterator]();for(;;){let[a,o]=yield Gn.__await(Promise.all([n.next(),i.next()]));if(a.done||o.done)return yield Gn.__await(void 0);yield yield Gn.__await([a.value,o.value])}},"async_1"))}*sync(e){if(!(0,lc.isIterable)(this.other))throw new Error("Unsupported operation exception");let t=e[Symbol.iterator](),n=this.other[Symbol.iterator]();for(;;){let i=t.next(),a=n.next();if(i.done||a.done)return;yield[i.value,a.value]}}};s(Or,"ZipTransducer");Ye.ZipTransducer=Or;function hp(r){return new Or(r)}s(hp,"zip");Ye.zip=hp;function bp(){return new Or((0,gp.range)(0))}s(bp,"zipWithIndex");Ye.zipWithIndex=bp});var G=v(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});var L=k();L.__exportStar(wr(),_);L.__exportStar(To(),_);L.__exportStar(Oo(),_);L.__exportStar(Ro(),_);L.__exportStar(ko(),_);L.__exportStar(Dn(),_);L.__exportStar(Mo(),_);L.__exportStar(Es(),_);L.__exportStar(Io(),_);L.__exportStar(Fo(),_);L.__exportStar(Ms(),_);L.__exportStar(jo(),_);L.__exportStar(Lo(),_);L.__exportStar(qo(),_);L.__exportStar(Is(),_);L.__exportStar(Bo(),_);L.__exportStar(Wo(),_);L.__exportStar(Vo(),_);L.__exportStar(Jo(),_);L.__exportStar(Zo(),_);L.__exportStar(oc(),_);L.__exportStar(cc(),_);L.__exportStar(uc(),_)});var ce=v($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.caching=$t.cache=void 0;function Cp(r,e,t){if(typeof t.value!="function")throw new Error("@cache can only decorate methods");let n=new WeakMap;function i(a){let o=n.get(a);if(o)return o;let c=new Map;return n.set(a,c),c}return s(i,"getCache"),Object.defineProperty(r,e,Object.assign(Object.assign({},t),{value:function(...a){let o=JSON.stringify(a),c=i(this),l=c.get(o);if(typeof l!="undefined"||c.has(o))return l;let f=t.value.call(this,...a);return c.set(o,f),f}}))}s(Cp,"cache");$t.cache=Cp;function Pp(r){let e=new Map;return function(...t){let n=JSON.stringify(t),i=e.get(n);if(typeof i!="undefined"||e.has(n))return i;let a=r(...t);return e.set(n,a),a}}s(Pp,"caching");$t.caching=Pp});var Pi=v(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.StoppedClock=Yt.SystemClock=void 0;var na=class{now(){return new Date}};s(na,"SystemClock");Yt.SystemClock=na;var ia=class{constructor(e){this.value=e}now(){return this.value}};s(ia,"StoppedClock");Yt.StoppedClock=ia});var ut=v(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.Days=j.hasNativeToParts=j.yearOf=j.dayOf=j.monthOf=j.Month=j.weekdayOf=j.Weekday=j.defaultOptions=j.date=void 0;function Xc(r,e,t){if(e&&(e<1||e>12))throw new Error(`Invalid month ${e}`);if(t&&(t<1||t>31))throw new Error(`Invalid day ${t}`);let n=new Date(Date.UTC(r,e?e-1:0,t||1));if(r!==oa(n))throw new Error(`Invalid year ${r}`);if(e&&e!==sa(n))throw new Error(`Invalid month ${e}`);if(t&&t!==aa(n))throw new Error(`Invalid day ${t}`);return n}s(Xc,"date");j.date=Xc;j.defaultOptions={year:"numeric",month:"numeric",day:"numeric",weekday:"long"};var Qc;(function(r){r[r.Monday=1]="Monday",r[r.Tuesday=2]="Tuesday",r[r.Wednesday=3]="Wednesday",r[r.Thursday=4]="Thursday",r[r.Friday=5]="Friday",r[r.Saturday=6]="Saturday",r[r.Sunday=7]="Sunday"})(Qc=j.Weekday||(j.Weekday={}));function xf(r){let e=r.getUTCDay();return e===0?Qc.Sunday:e}s(xf,"weekdayOf");j.weekdayOf=xf;var Df;(function(r){r[r.January=1]="January",r[r.February=2]="February",r[r.March=3]="March",r[r.April=4]="April",r[r.May=5]="May",r[r.June=6]="June",r[r.July=7]="July",r[r.August=8]="August",r[r.September=9]="September",r[r.October=10]="October",r[r.November=11]="November",r[r.December=12]="December"})(Df=j.Month||(j.Month={}));function sa(r){return r.getUTCMonth()+1}s(sa,"monthOf");j.monthOf=sa;function aa(r){return r.getUTCDate()}s(aa,"dayOf");j.dayOf=aa;function oa(r){return r.getUTCFullYear()}s(oa,"yearOf");j.yearOf=oa;j.hasNativeToParts=typeof Intl.DateTimeFormat.prototype.formatToParts=="function";var lt=class{static startOf(e){return Xc(oa(e),sa(e),aa(e))}static add(e,t){let n=new Date(e.getTime());return n.setUTCDate(e.getUTCDate()+t),n}static subtract(e,t){return lt.add(e,t*-1)}static between(e,t){return Math.abs((e.getTime()-t.getTime())/lt.milliseconds)}};s(lt,"Days");j.Days=lt;lt.milliseconds=24*60*60*1e3});var Be=v(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.splitByRegex=H.characters=H.removeUnicodeMarkers=H.different=H.suffix=H.prefix=H.replace=H.isNonMatch=H.isNamedMatch=H.NamedRegExp=void 0;var Cf=/\(\?<([^>]+)>/g,qr=class{constructor(e,t){this.pattern=e,this.names=t}static create(e,t){let n=[],i=el(Cf,e,a=>(n.push(a[1]),"("));return new qr(new RegExp(i,t),n)}match(e){let t=e.match(this.pattern);return t?this.namedMatch(t):[]}namedMatch(e){return e.slice(1).map((n,i)=>({name:this.names[i],value:n}))}*exec(e){let t=new RegExp(this.pattern.source,"g");for(;;){let n=t.exec(e);if(!n)break;yield this.namedMatch(n)}}*iterate(e){let t=0,n=new RegExp(this.pattern.source,"g");for(;;){let a=n.exec(e);if(!a)break;let o=e.substring(t,a.index);o&&(yield o),yield this.namedMatch(a),t=n.lastIndex}let i=e.substring(t);i&&(yield i)}toString(){return`Pattern: ${this.pattern} Names: ${JSON.stringify(this.names)}`}toJSON(){return{pattern:this.pattern.source,names:this.names}}};s(qr,"NamedRegExp");H.NamedRegExp=qr;function Pf(r){return Array.isArray(r)}s(Pf,"isNamedMatch");H.isNamedMatch=Pf;function Af(r){return typeof r=="string"}s(Af,"isNonMatch");H.isNonMatch=Af;function el(r,e,t,n=i=>i){let i=[],a=0,o;for(;(o=r.exec(e))!=null;)i.push(n(e.substring(a,o.index))),i.push(t(o)),a=r.lastIndex;return i.push(n(e.substring(a))),i.join("")}s(el,"replace");H.replace=el;function ca(r,e){for(let t=0;t{let l=ci.slice(t,n?-n:void 0).join(""))}s(Tf,"different");H.different=Tf;function rl(r){return r.replace(/[\u200E\u200F]/g,"")}s(rl,"removeUnicodeMarkers");H.removeUnicodeMarkers=rl;function nl(r){return Of(rl(r))}s(nl,"characters");H.characters=nl;function Of(r){return typeof Symbol=="function"&&r[Symbol.iterator]?[...r]:il(r)}s(Of,"split");var Rf=/(?=(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/;function il(r){return r.split(Rf)}s(il,"splitByRegex");H.splitByRegex=il});var Kr=v(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.formatData=K.format=K.valueFromParts=K.SimpleFormat=K.ImprovedDateTimeFormat=K.Formatters=K.optionsFrom=K.partsFrom=K.dateTimeFormat=void 0;var kf=k(),sl=ut(),Ef=ne(),Mf=G(),la=Be(),If=ce();function ua(r,e){return new Intl.DateTimeFormat(r,Object.assign(Object.assign({},e),{timeZone:"UTC"}))}s(ua,"dateTimeFormat");K.dateTimeFormat=ua;function _f(r,e){if(r==="year"){if(e===4)return"numeric";if(e===2)return"2-digit"}if(r==="month"){if(e===4)return"long";if(e===3)return"short";if(e===2)return"2-digit";if(e===1)return"numeric"}if(r==="day"){if(e===2)return"2-digit";if(e===1)return"numeric"}if(r==="weekday"){if(e===4)return"long";if(e===3)return"short"}throw new Error(`Illegal Argument: ${r} ${e}`)}s(_f,"formatFrom");var Ff=la.NamedRegExp.create("(?:(?y+)|(?M+)|(?d+)|(?E+))","g");function da(r){return(0,Ef.array)(Ff.iterate(r),(0,Mf.map)(e=>{if((0,la.isNamedMatch)(e)){let[t]=e.filter(a=>Boolean(a.value)),n=t.name,i=_f(n,t.value.length);return{type:n,value:i}}else return{type:"literal",value:e}}))}s(da,"partsFrom");K.partsFrom=da;function al(r){let e=typeof r=="string"?da(r):r,t=["year","month","day","weekday"];return e.filter(n=>t.indexOf(n.type)!=-1).reduce((n,i)=>(n[i.type]=i.value,n),typeof r=="string"?{format:r}:{})}s(al,"optionsFrom");K.optionsFrom=al;var Zt=class{static create(e,t){return typeof t=="string"?new Hr(e,t):typeof t.format=="string"?new Hr(e,t.format):new Ai(e,t)}};s(Zt,"Formatters");kf.__decorate([If.cache],Zt,"create",null);K.Formatters=Zt;var Ai=class{constructor(e,t,n=ua(e,t)){this.locale=e,this.options=t,this.delegate=n}format(e){return(0,la.removeUnicodeMarkers)(this.delegate.format(e))}formatToParts(e){return this.delegate.formatToParts(e)}};s(Ai,"ImprovedDateTimeFormat");K.ImprovedDateTimeFormat=Ai;var Hr=class{constructor(e,t){this.locale=e,this.formatString=t,this.partsInOrder=da(t),this.options=al(this.partsInOrder)}format(e){return this.formatToParts(e).map(t=>t.value).join("")}formatToParts(e){let t=ua(this.locale,this.options).formatToParts(e);return this.partsInOrder.map(n=>({type:n.type,value:this.valueFor(t,n.type,n.value)}))}valueFor(e,t,n){return t==="literal"?n:ol(e,t)}};s(Hr,"SimpleFormat");K.SimpleFormat=Hr;function ol(r,e){return r.filter(t=>t.type===e).map(t=>t.value).join("")}s(ol,"valueFromParts");K.valueFromParts=ol;function jf(r,e,t=sl.defaultOptions){if(r==null)throw new Error("Date format requires a value");return Zt.create(e,t).format(r)}s(jf,"format");K.format=jf;function Lf(r,e,t=sl.defaultOptions){return Zt.create(e,t).formatToParts(r)}s(Lf,"formatData");K.formatData=Lf});var Ur=v(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.unique=Xt.flatten=void 0;function qf(r){return r.flatMap(e=>e)}s(qf,"flatten");Xt.flatten=qf;function cl(r){return typeof r=="function"&&r.toString().includes("native code")}s(cl,"isNativeFunction");var Hf=cl(Set)&&new Set([1]).size===1;function Kf(r){if(cl(Array.from)&&Hf)return Array.from(new Set(r));let e=[];for(let t of r)e.indexOf(t)<0&&e.push(t);return e}s(Kf,"unique");Xt.unique=Kf});var Br=v(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.get=Qt.identity=void 0;function Uf(){return r=>r}s(Uf,"identity");Qt.identity=Uf;function Bf(r,e=void 0){try{let t=r();return typeof t=="undefined"?e:t}catch(t){return e}}s(Bf,"get");Qt.get=Bf});var Mi=v(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.extraDelimiters=R.CachingParser=R.all=R.AllParser=R.parsers=R.or=R.OrParser=R.FailParser=R.IdentityParser=R.mappingParser=R.MappingParser=R.preProcess=R.PreProcessor=R.namedRegexParser=R.NamedRegexParser=void 0;var ll=k(),ul=Be(),$f=G(),dl=ce(),pl=ne(),Ti=class{constructor(e){this.regex=e}parse(e){let t=this.regex.match(e);if(t.length===0)throw new Error(`Generated regex ${this.regex.pattern} did not match "${e}" `);return t}parseAll(e){return(0,pl.array)(this.regex.exec(e))}};s(Ti,"NamedRegexParser");R.NamedRegexParser=Ti;function Gf(r){return new Ti(r)}s(Gf,"namedRegexParser");R.namedRegexParser=Gf;var Oi=class{constructor(e,t){this.delegate=e,this.mapper=t}parse(e){return this.delegate.parse(this.mapper(e))}parseAll(e){return this.delegate.parseAll(this.mapper(e))}};s(Oi,"PreProcessor");R.PreProcessor=Oi;function Nf(r,e){return new Oi(r,e)}s(Nf,"preProcess");R.preProcess=Nf;var Ri=class{constructor(e,t){this.parser=e,this.mapper=t}parse(e){return this.mapper(this.parser.parse((0,ul.removeUnicodeMarkers)(e)))}parseAll(e){return e?(0,pl.array)(this.parser.parseAll((0,ul.removeUnicodeMarkers)(e)),(0,$f.flatMap)(t=>{try{return[this.mapper(t)]}catch(n){return[]}})):[]}};s(Ri,"MappingParser");R.MappingParser=Ri;function zf(r,e){return new Ri(r,e)}s(zf,"mappingParser");R.mappingParser=zf;var pa=class{parse(e){return e}parseAll(e){return[e]}};s(pa,"IdentityParser");R.IdentityParser=pa;var fa=class{parse(e){throw new Error}parseAll(e){return[]}};s(fa,"FailParser");R.FailParser=fa;var ki=class{constructor(e){this.parsers=e}parse(e){for(let t of this.parsers)try{let n=t.parse(e);if(n)return n}catch(n){}throw new Error(`Unable to parse value: ${e}`)}parseAll(e){for(let t of this.parsers){let n=t.parseAll(e);if(n.length>0)return n}return[]}};s(ki,"OrParser");R.OrParser=ki;function fl(...r){return new ki(r)}s(fl,"or");R.or=fl;function Wf(...r){return fl(...r)}s(Wf,"parsers");R.parsers=Wf;var Ei=class{constructor(e){this.parsers=e}parse(e){throw new Error("Not supported, please call AllParser.parseAll")}parseAll(e){return this.parsers.flatMap(t=>t.parseAll(e))}};s(Ei,"AllParser");R.AllParser=Ei;function Vf(...r){return new Ei(r)}s(Vf,"all");R.all=Vf;var $r=class{constructor(e){this.parser=e}parse(e){return this.parser.parse(e)}parseAll(e){return this.parser.parseAll(e)}};s($r,"CachingParser");ll.__decorate([dl.cache],$r.prototype,"parse",null);ll.__decorate([dl.cache],$r.prototype,"parseAll",null);R.CachingParser=$r;R.extraDelimiters=" -/"});var Gr=v(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.atBoundaryOnly=Ee.cleanValue=Ee.boundaryDelimiters=void 0;Ee.boundaryDelimiters=",.";var Jf=new RegExp(`[${Ee.boundaryDelimiters}]$`);function Yf(r){return r.replace(Jf,"").trim()}s(Yf,"cleanValue");Ee.cleanValue=Yf;function Zf(r){return`(?:^|\\s)${r}(?=[\\s${Ee.boundaryDelimiters}]|$)`}s(Zf,"atBoundaryOnly");Ee.atBoundaryOnly=Zf});var yl=v(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.Row=ee.PrefixTree=ee.DEFAULT_COMPARATOR=ee.pair=ee.Trie=ee.TrieFactory=void 0;var er=k(),tr=He(),Xf=Be(),Qf=Q(),em=Ks(),rr=_t(),se=G(),dt=class{constructor(e=Qf.ascending){this.comparator=e}get avlTree(){return em.AVLTree.empty(this.comparator)}get empty(){return new Qe(this,void 0,this.avlTree)}create(e,t=this.avlTree){return new Qe(this,e,t)}construct(e,t){if(e.length===0)return this.create(t);let[n,...i]=e;return this.create(void 0,this.avlTree.insert(n,this.construct(i,t)))}};s(dt,"TrieFactory");er.__decorate([tr.lazy],dt.prototype,"avlTree",null);er.__decorate([tr.lazy],dt.prototype,"empty",null);ee.TrieFactory=dt;var Qe=class{constructor(e=new dt,t,n=e.avlTree){this.factory=e,this.value=t,this.children=n}contains(e){return!!this.lookup(e)}get isEmpty(){return!this.value&&this.children.isEmpty}lookup(e){if(e.length==0)return this.value;let[t,...n]=e,i=this.children.lookup(t);return i&&i.lookup(n)}match(e){if(e.length==0){let a=this.value?[this.value]:[];return(0,se.single)(this.children.values(),(0,se.reduce)((o,c)=>o.concat(c.match(e)),a))}let[t,...n]=e,i=this.children.lookup(t);return i?i.match(n):[]}insert(e,t){if(e.length===0)return this.factory.create(t,this.children);let[n,...i]=e,a=this.children.lookup(n);return a?a=a.insert(i,t):a=this.factory.construct(i,t),this.factory.create(this.value,this.children.insert(n,a))}delete(e){return this.insert(e,void 0)}entries(){function*e(n,[i,a]){n=[...n,i],a.value&&(yield ma(n,a.value)),yield*t(a,n)}s(e,"recurse");function t(n,i){return(0,rr.sequence)(n.children.entries(),(0,se.flatMap)(a=>e(i,a)))}return s(t,"recurseChildren"),t(this,[])}keys(){return(0,rr.sequence)(this.entries(),(0,se.map)(([e])=>e))}values(){return(0,rr.sequence)(this.entries(),(0,se.map)(([,e])=>e))}get height(){return(0,se.single)(this.children.values(),(0,se.reduce)((e,t)=>Math.max(e,t.height+1),0))}toString(){return(this.value?`(${this.value})`:"")+this.children}};s(Qe,"Trie");er.__decorate([tr.lazy],Qe.prototype,"isEmpty",null);er.__decorate([tr.lazy],Qe.prototype,"height",null);ee.Trie=Qe;function ma(r,e){return[r,e]}s(ma,"pair");ee.pair=ma;var tm=new Intl.Collator(void 0,{usage:"sort",sensitivity:"base"}).compare;ee.DEFAULT_COMPARATOR=tm;var et=class{constructor(e=Xf.characters,t=ee.DEFAULT_COMPARATOR,n=new Qe(new dt(t))){this.converter=e,this.comparator=t,this.trie=n}contains(e){return!!this.lookup(e)}get isEmpty(){return this.trie.isEmpty}match(e){return this.trie.match(this.converter(e))}lookup(e){return this.trie.lookup(this.converter(e))}insert(e,t=e){return new et(this.converter,this.comparator,this.trie.insert(this.converter(e),t))}delete(e){return new et(this.converter,this.comparator,this.trie.insert(this.converter(e),void 0))}entries(){return(0,rr.sequence)(this.trie.entries(),(0,se.map)(([e,t])=>ma(e.join(""),t)))}keys(){return(0,rr.sequence)(this.entries(),(0,se.map)(([e])=>e))}values(){return(0,rr.sequence)(this.entries(),(0,se.map)(([,e])=>e))}get height(){return this.trie.height}search(e,t){let n=pt.create(this.converter(e),this.comparator);return(0,se.single)(this.trie.children.entries(),(0,se.reduce)((i,[a,o])=>i.concat(ml(o,a,n,t)),[]))}};s(et,"PrefixTree");er.__decorate([tr.lazy],et.prototype,"isEmpty",null);er.__decorate([tr.lazy],et.prototype,"height",null);ee.PrefixTree=et;function ml(r,e,t,n){let i=t.next(e),a=[];return i.distance<=n&&r.value&&a.push({value:r.value,distance:i.distance}),i.minimal<=n?(0,se.single)(r.children.entries(),(0,se.reduce)((o,[c,l])=>o.concat(ml(l,c,i,n)),a)):a}s(ml,"recurse");var pt=class{constructor(e,t,n){this.keys=e,this.values=t,this.comparator=n}static create(e,t){let n=[];for(let i=0;i<=e.length;i++)n[i]=i;return new pt(e,n,t)}next(e){let t=this.keys.reduce((n,i,a)=>(n[a+1]=this.comparator(i,e)===0?this.values[a]:1+Math.min(n[a],this.values[a],this.values[a+1]),n),[this.values[0]+1]);return new pt(this.keys,t,this.comparator)}get distance(){return this.values[this.keys.length]}get minimal(){return Math.min(...this.values)}};s(pt,"Row");ee.Row=pt});var Nr=v($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.Weekdays=$.Months=$.numberFormatter=$.Numerals=$.numberOf=$.DatumLookup=$.uniqueMatch=void 0;var rm=k(),gl=yl(),hl=Gr(),ya=Ur(),ga=Be(),nm=Br(),im=ne(),bl=G(),sm=He(),am=ce();function wl(r,e){let t=(0,ya.flatten)(r.match(e)),n=(0,ya.unique)(t.map(i=>i.value));if(n.length==1)return n[0]}s(wl,"uniqueMatch");$.uniqueMatch=wl;var nr=class{constructor(e,t=gl.DEFAULT_COMPARATOR){this.data=e,this.prefixTree=this.data.reduce((n,i)=>{let a=n.lookup(i.name)||[];return a.push(i),n.insert(i.name,a)},new gl.PrefixTree(void 0,t))}parse(e,t=wl){let n=t(this.prefixTree,e);if(typeof n=="undefined")throw new Error(`${this.constructor.name} - Unable to parse: ${e}`);return n}get pattern(){return`[${this.characters.join("")}]{1,${this.max}}`}get max(){return this.data.reduce((e,t)=>{let n=(0,ga.characters)(t.name).length;return Math.max(e,n)},Number.MIN_VALUE)}get characters(){return(0,ya.unique)(this.data.map(e=>e.name).flatMap(ga.characters)).sort()}};s(nr,"DatumLookup");$.DatumLookup=nr;function vl(r){return!r||r.trim().length===0?NaN:Number(r)}s(vl,"numberOf");$.numberOf=vl;var pe=class extends nr{constructor(e,t){super(e);this.locale=t}static get(e,t=[]){return pe.cache[e]=pe.cache[e]||pe.create(e,t)}static create(e,t=[]){return new pe([...pe.generateData(e),...t],e)}static generateData(e){let t=(0,$.numberFormatter)(e).format(1234567890).replace(/[,. '٬٫]/g,"");return(0,im.array)((0,ga.characters)(t),(0,bl.zip)([1,2,3,4,5,6,7,8,9,0]),(0,bl.map)(([n,i])=>({name:n,value:i})))}parse(e){let t=vl(e);return isNaN(t)?super.parse(e):t}get pattern(){let e=this.characters.join("");return e==="0123456789"?"\\d":`\\d${e}`}format(e){return(0,$.numberFormatter)(this.locale).format(e)}};s(pe,"Numerals");pe.cache={};rm.__decorate([sm.lazy],pe.prototype,"pattern",null);$.Numerals=pe;$.numberFormatter=(0,am.caching)(r=>new Intl.NumberFormat(r,{useGrouping:!1}));var ha=class extends nr{constructor(e,t){super(e);this.numerals=pe.get(t)}parse(e){let t=(0,nm.get)(()=>this.numerals.parse(e));return isNaN(t)?super.parse((0,hl.cleanValue)(e)):t}};s(ha,"Months");$.Months=ha;var ba=class extends nr{parse(e){return super.parse((0,hl.cleanValue)(e))}};s(ba,"Weekdays");$.Weekdays=ba});var Fi=v(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.weekdays=te.WeekdaysBuilder=te.months=te.MonthsBuilder=te.additionalMonthsDatum=te.monthDatum=void 0;var zr=k(),Sl=ut(),Ii=Kr(),xl=Gr(),Wr=ce(),Dl=Nr();function Cl(r,e){let t=[];for(let n=r;n<=e;n++)t.push(n);return t}s(Cl,"range");function _i(r){return r.map((e,t)=>({name:e,value:t+1}))}s(_i,"monthDatum");te.monthDatum=_i;var Pl=[{name:"Mrz",value:3},{name:"Sep.",value:9}],Al=[["jan\xFAar","febr\xFAar","mars","apr\xEDl","ma\xED","j\xFAn\xED","j\xFAl\xED","\xE1g\xFAst","september","okt\xF3ber","n\xF3vember","desember"],["jan.","feb.","mar.","apr.","ma\xED","j\xFAn.","j\xFAl.","\xE1g\xFA.","sep.","okt.","n\xF3v.","des."]].flatMap(_i),Tl=_i(["gener","febrer","mar\xE7","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"]),Ol=[{name:"ene",value:1},{name:"abr",value:4},{name:"ago",value:8},{name:"dic",value:12}];te.additionalMonthsDatum={de:Pl,"de-DE":Pl,ca:Tl,"ca-ES":Tl,es:Ol,"es-ES":Ol,is:Al,"is-IS":Al};var Me=class{constructor(e={}){this.monthsData=e}static create(e){return new Me(e.monthsData)}build(e){let t=Me.formats.flatMap(n=>this.datumFor(e,n));return new Dl.Months([...this.monthsData[e]||[],...te.additionalMonthsDatum[e]||[],...t],e)}datumFor(e,t){return _i(this.namesFor(e,t))}namesFor(e,t){let n=Cl(1,12).map(a=>(0,Sl.date)(2e3,a,1)),i=Ii.Formatters.create(e,t);return n.map(a=>(0,Ii.valueFromParts)(i.formatToParts(a),"month")).map(xl.cleanValue)}};s(Me,"MonthsBuilder");Me.formats=[{month:"long"},{month:"short"},{year:"numeric",month:"long",day:"numeric"},{year:"numeric",month:"short",day:"numeric"}];zr.__decorate([Wr.cache],Me.prototype,"build",null);zr.__decorate([Wr.cache],Me.prototype,"namesFor",null);te.MonthsBuilder=Me;function om(r,e="long"){let t=Object.assign({},typeof e=="string"?{month:e}:e);return Me.create(t).namesFor(r,t)}s(om,"months");te.months=om;var we=class{constructor(e={}){this.weekdayData=e}static create(e){let t=e.weekdaysData;return this._create(t)}static _create(e){return new we(e)}build(e){let t=we.formats.flatMap(n=>this.datumFor(e,n));return new Dl.Weekdays([...this.weekdayData[e]||[],...t])}datumFor(e,t){return this.namesFor(e,t).map((n,i)=>({name:n,value:i+1}))}namesFor(e,t){let n=Cl(1,7).map(a=>(0,Sl.date)(2e3,1,a+2)),i=Ii.Formatters.create(e,t);return n.map(a=>(0,Ii.valueFromParts)(i.formatToParts(a),"weekday")).map(xl.cleanValue)}};s(we,"WeekdaysBuilder");we.formats=[{weekday:"long"},{weekday:"short"},{year:"numeric",month:"numeric",day:"numeric",weekday:"long"},{year:"numeric",month:"numeric",day:"numeric",weekday:"short"}];zr.__decorate([Wr.cache],we.prototype,"build",null);zr.__decorate([Wr.cache],we.prototype,"namesFor",null);zr.__decorate([Wr.cache],we,"_create",null);te.WeekdaysBuilder=we;function cm(r,e="long"){let t=Object.assign({},typeof e=="string"?{weekday:e}:e);return we.create(t).namesFor(r,t)}s(cm,"weekdays");te.weekdays=cm});var Pa=v(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.formatBuilder=x.parser=x.defaultParserOptions=x.DefaultDateFactory=x.dateFrom=x.DateTimeFormatPartParser=x.DateParser=x.escapeCharacters=x.RegexBuilder=x.inferDecimalSeparator=x.numberParser=x.NumberParser=x.decimalSeparator=x.isDecimalSeparator=x.separatorsOf=x.mapIgnoreError=x.numberPattern=x.Spaces=void 0;var ji=k(),lm=He(),Vr=Be(),Rl=G(),Jr=ce(),kl=ne(),wa=ut(),El=Ur(),va=Br(),ir=Mi(),Sa=Kr(),xa=Gr(),sr=Nr(),Li=Fi(),ue=class{static handle(e){return ue.codes.indexOf(e)!=-1?ue.spaces:e}static remove(e){return e&&e.replace(ue.pattern,"")}};s(ue,"Spaces");x.Spaces=ue;ue.codes=[32,160,8239].map(r=>String.fromCharCode(r));ue.spaces=ue.codes.join("");ue.pattern=new RegExp(`[${ue.spaces}]`,"g");var Ml=`\u066C\u066B,.'\u2019\u2018${ue.spaces}`;x.numberPattern=(0,Jr.caching)(r=>{let e=sr.Numerals.get(r).pattern;return`-?(?:[${e}]+[${Ml}])*[${e}]+`});function Il(r){return(0,Rl.flatMap)(e=>{try{return[r(e)]}catch(t){return[]}})}s(Il,"mapIgnoreError");x.mapIgnoreError=Il;var um=Vr.NamedRegExp.create(`(?[${Ml}])`);function _l(r){return(0,kl.array)(um.exec(r),(0,Rl.map)(([e])=>e.value))}s(_l,"separatorsOf");x.separatorsOf=_l;function Da(r){return r&&typeof r=="string"&&r==="."||r===","||r==="\u066B"}s(Da,"isDecimalSeparator");x.isDecimalSeparator=Da;function Fl(r){if(Da(r))return r;throw new Error(`Invalid decimal separator${r}`)}s(Fl,"decimalSeparator");x.decimalSeparator=Fl;var qi=class{constructor(e,t){this.decimalSeparator=e,this.locale=t,this.strictNumberPattern=new RegExp(`^${(0,x.numberPattern)(t)}$`),this.globalNumberPattern=Vr.NamedRegExp.create(`(?${(0,x.numberPattern)(t)})`,"g")}parse(e){if(!this.strictNumberPattern.test(e))throw new Error(`Unable to parse '${e}'`);return this.parseSingle(e)}parseAll(e){return(0,kl.array)(this.globalNumberPattern.exec(e),Il(([t])=>this.parseSingle(t.value.trim())))}parseSingle(e,t=this.decimalSeparator(e)){let n=_l(e);if(n.length===0)return this.numberOf(e,t);let a=n[n.length-1]===t?n.slice(0,n.length-1):n;if(a.indexOf(t)!==-1)throw new Error(`Unable to parse '${e}'`);if((0,El.unique)(a).length>1)throw new Error(`Unable to parse '${e}'`);return this.numberOf(e,t)}convert(e,t){let n=sr.Numerals.get(this.locale);return(0,Vr.characters)(e).map(i=>{if(i===t)return".";if(i==="-")return"-";let a=(0,va.get)(()=>n.parse(i));return isNaN(a)?"":a.toString()}).join("")}numberOf(e,t){let n=this.convert(e,t),i=(0,sr.numberOf)(n);if(isNaN(i))throw new Error(`Unable to parse '${e}'`);return i}};s(qi,"NumberParser");x.NumberParser=qi;function Hi(r,e="en"){return r?Da(r)?new qi(t=>r,e):Hi((0,x.inferDecimalSeparator)(r),r):Hi(e)}s(Hi,"numberParser");x.numberParser=Hi;x.inferDecimalSeparator=(0,Jr.caching)(r=>(0,va.get)(()=>Fl(new Intl.NumberFormat(r).formatToParts(.1).find(e=>e.type==="decimal").value),"."));var $e=class{constructor(e,t=wa.defaultOptions,n){this.locale=e,this.options=t,this.formatted=n}static create(e,t=wa.defaultOptions){return typeof t=="string"?Ca(e,t):typeof t.format=="string"?Ca(e,t.format,t.strict):new $e(e,t,(0,Sa.formatData)(new Date,e,t))}get pattern(){let e=this.formatted.map((t,n)=>{switch(t.type){case"year":return`(?[${sr.Numerals.get(this.locale).pattern}]{${this.lengthOf(t.value)}})`;case"month":return`(?${this.monthsPattern()})`;case"day":return`(?[${sr.Numerals.get(this.locale).pattern}]{1,2})`;case"weekday":return`(?${Li.WeekdaysBuilder.create(this.options).build(this.locale).pattern.toLocaleLowerCase(this.locale)})`;default:{let i=(0,El.unique)((0,Vr.characters)(jl(this.addExtraLiterals(t)))).join("").replace(" ","\\s"),o=n===this.formatted.length-1?"*":"+";return`[${i}]${o}?`}}}).join("");return(0,xa.atBoundaryOnly)(e)}lengthOf(e){return e.length===2||e==="2-digit"?2:4}addExtraLiterals(e){return this.options.strict?e.value:this.options.format?e.value+(this.options.separators||xa.boundaryDelimiters):e.value+(this.options.separators||xa.boundaryDelimiters+ir.extraDelimiters)}monthsPattern(){let e=`[${sr.Numerals.get(this.locale).pattern}]{1,2}`,t=Li.MonthsBuilder.create(this.options).build(this.locale).pattern.toLocaleLowerCase(this.locale);return this.options.month==="2-digit"||this.options.month==="numeric"?e:this.options.month==="short"||this.options.month==="long"?t:`(?:${e}|${t})`}};s($e,"RegexBuilder");ji.__decorate([lm.lazy],$e.prototype,"pattern",null);ji.__decorate([Jr.cache],$e,"create",null);x.RegexBuilder=$e;function jl(r){return r.replace(/[\-]/g,"\\$&")}s(jl,"escapeCharacters");x.escapeCharacters=jl;var ar=class{static create(e,t){let n=$e.create(e,t).pattern;return(0,ir.mappingParser)(Yr.create(Vr.NamedRegExp.create(n),e),i=>Ll(i,e,t))}};s(ar,"DateParser");ji.__decorate([Jr.cache],ar,"create",null);x.DateParser=ar;var Yr=class{static create(e,t){return(0,ir.preProcess)((0,ir.mappingParser)((0,ir.namedRegexParser)(e),n=>this.convert(n,t)),n=>this.preProcess(n,t))}static convert(e,t){return e.map(n=>({type:n.name,value:n.value.toLocaleUpperCase(t)}))}static preProcess(e,t){return e.toLocaleLowerCase(t)}};s(Yr,"DateTimeFormatPartParser");ji.__decorate([Jr.cache],Yr,"create",null);x.DateTimeFormatPartParser=Yr;function Ll(r,e,t){var n;let i=Hi(".",e),a=r.find(T=>T.type==="day");if(!a)throw new Error("No day found");let o=i.parse(a.value),c=r.find(T=>T.type==="month");if(!c)throw new Error("No month found");let l=Li.MonthsBuilder.create(t).build(e).parse(c.value),f=r.find(T=>T.type==="year"),h=f?i.parse(f.value):void 0,P=r.find(T=>T.type==="weekday"),w=P?(0,va.get)(()=>Li.WeekdaysBuilder.create(t).build(e).parse(P.value)):void 0;return((n=t.factory)!==null&&n!==void 0?n:new Ki).create({year:h,month:l,day:o,weekday:w})}s(Ll,"dateFrom");x.dateFrom=Ll;var Ki=class{create({year:e,month:t,day:n}){if(typeof e=="undefined")throw new Error("No year found");return(0,wa.date)(e,t,n)}};s(Ki,"DefaultDateFactory");x.DefaultDateFactory=Ki;x.defaultParserOptions=[{year:"numeric",month:"long",day:"numeric",weekday:"long"},{year:"numeric",month:"short",day:"numeric",weekday:"short"},{year:"numeric",month:"numeric",day:"numeric"},{year:"numeric",month:"short",day:"numeric"},{year:"numeric",month:"long",day:"numeric"}];function ql(r,e){switch(typeof e){case"string":return ar.create(r,{format:e});case"object":return ar.create(r,e);default:return(0,ir.or)(...x.defaultParserOptions.map(t=>ql(r,t)))}}s(ql,"parser");x.parser=ql;function Ca(r,e,t=!1){return new $e(r,Object.assign(Object.assign({},(0,Sa.optionsFrom)(e)),{strict:t}),(0,Sa.partsFrom)(e))}s(Ca,"formatBuilder");x.formatBuilder=Ca});var Bl=v(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.SmartDate=W.Pivot=W.InferYear=W.InferDirection=W.InferYearViaWeekday=W.compositeDateFactory=W.parse=void 0;var Hl=G(),Ui=Pi(),Kl=_t(),dm=ne(),ve=ut(),Ul=Pa();function pm(r,e,t){return(0,Ul.parser)(e,t).parse(r)}s(pm,"parse");W.parse=pm;var Aa=class{constructor(e){this.factories=e}create(e){for(let t of this.factories)try{return t.create(e)}catch(n){}throw new Error(`Unable to create date for ${JSON.stringify(e)}`)}};s(Aa,"CompositeDateFactory");function fm(...r){return new Aa(r)}s(fm,"compositeDateFactory");W.compositeDateFactory=fm;var Zr=class{constructor(e){this.clock=e}static create(e=new Ui.SystemClock){return new Zr(e)}create({year:e,month:t,day:n,weekday:i}){if(e)return(0,ve.date)(e,t,n);if(!i)throw new Error("No weekday provided");let a=this.candidates(t,n).find(o=>(0,ve.weekdayOf)(o)===i);if(a)return a;throw new Error("No candidate date found that matches")}candidates(e,t){let n=ve.Days.startOf(this.clock.now());return(0,dm.array)((0,Kl.range)(0,-6),(0,Hl.zip)((0,Kl.range)(1,6)),(0,Hl.flatMap)(i=>i),(0,Ul.mapIgnoreError)(i=>(0,ve.date)((0,ve.yearOf)(n)+i,e,t)))}};s(Zr,"InferYearViaWeekday");W.InferYearViaWeekday=Zr;var Xr;(function(r){r[r.Before=-1]="Before",r[r.After=1]="After"})(Xr=W.InferDirection||(W.InferDirection={}));var Se=class{constructor(e,t){this.direction=t,this.date=ve.Days.startOf(e)}static before(e){return new Se(e,Xr.Before)}static after(e){return new Se(e,Xr.After)}static sliding(e=new Ui.SystemClock){let t=e.now();return Se.before((0,ve.date)((0,ve.yearOf)(t)+50,1,1))}create({year:e,month:t,day:n}){if(e&&e<10)throw new Error("Illegal year");if(e&&e>=100&&e<1e3)throw new Error("Illegal year");if(e&&e>=1e3)return(0,ve.date)(e,t,n);let i=this.calculateYear(e),a=(0,ve.date)(i,t,n);if(this.direction==Xr.Before&&athis.date)return a;let o=this.calculateYearIncrement(e);return a.setUTCFullYear(a.getUTCFullYear()+o*this.direction),a}calculateYearIncrement(e){return typeof e=="undefined"?1:100}calculateYear(e){if(typeof e=="undefined")return this.date.getUTCFullYear();let t=Math.floor(this.date.getUTCFullYear()/100)*100;return e+t}};s(Se,"InferYear");W.InferYear=Se;var Ta=class{static on(e){return Se.before((0,ve.date)(e,1,1))}static sliding(e=new Ui.SystemClock){return Se.sliding(e)}};s(Ta,"Pivot");W.Pivot=Ta;var Oa=class{constructor(e=new Ui.SystemClock){this.clock=e}create(e){return typeof e.year=="undefined"?Se.after(this.clock.now()).create(e):Se.sliding(this.clock).create(e)}};s(Oa,"SmartDate");W.SmartDate=Oa});var Gl=v(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.LearningDateFormatter=ae.FromFormatStringWeekdayExtractor=ae.FromFormatStringMonthExtractor=ae.FromFormatStringDataExtractor=ae.exactFormat=ae.BaseDataExtractor=void 0;var xe=k(),Bi=ut(),or=Be(),mm=ce(),Ie=He(),$l=Kr(),ym=ne(),gm=G(),Ra=Nr(),Qr=Fi(),$i=class{constructor(e,t,n,i){this.locale=e,this.options=t,this.dates=n,this.partType=i}};s($i,"BaseDataExtractor");ae.BaseDataExtractor=$i;function ka(r,e,t){let n=$l.Formatters.create(r,e);return t.map(i=>n.format(i))}s(ka,"exactFormat");ae.exactFormat=ka;var en=class extends $i{extract(){let e=Object.keys(this.options).length==1,t=ka(this.locale,this.options,this.dates);if(e)return t;let n=ka(this.locale,{[this.partType]:this.options[this.partType]},this.dates),i=this.diff(t),a=[];for(let o=0;of.length&&isNaN(parseInt(f))?l:f)}return a}diff(e){return(0,or.different)(e)}};s(en,"FromFormatStringDataExtractor");ae.FromFormatStringDataExtractor=en;var tt=class extends en{constructor(e,t,n){super(e,t,n,"month")}diff(e){if(!this.options.weekday)return super.diff(e);let t=[],n=(0,Qr.weekdays)(this.locale,this.options),i=n[this.day(this.dates[8])];for(let a=0;a{let n=t[1],i=t[2];if(i==="\u5E74")return`${n}year`;if(i==="\u6708")return`${n}month`;if(i==="\u65E5")return`${n}day`;throw new Error(`Unknown delimiter ${i}`)})}restoreYearMonthDay(e){return(0,or.replace)(tt.restoreYMD,e,t=>{let n=t[1];if(n==="year")return"\u5E74";if(n==="month")return"\u6708";if(n==="day")return"\u65E5";throw new Error(`Unknown delimiter ${n}`)})}day(e){let t=e.getUTCDay();return t==0?6:t-1}};s(tt,"FromFormatStringMonthExtractor");ae.FromFormatStringMonthExtractor=tt;tt.replaceYMD=/(\d)([年月日])/g;tt.restoreYMD=/(year|month|day)/g;var Ea=class extends en{constructor(e,t,n){super(e,t,n,"weekday")}diff(e){if(!this.options.day)return super.diff(e);let t=[],n=this.dates[0].getUTCDate().toString();for(let i=0;i`(?<${i}>${this[i]})`,"template"),n=`(?:${Object.keys(this.options).map(i=>e(i)).join("|")})`;return or.NamedRegExp.create(n)}get actualNamesPattern(){let e=Ra.Numerals.get(this.locale).pattern,t=this.learningNamesPattern,n=(0,ym.array)(t.iterate(this.formatted),(0,gm.map)(a=>{if((0,or.isNamedMatch)(a)){let[o]=a.filter(c=>Boolean(c.value)).map(c=>c.name);if(!o)throw new Error;if(o=="year")return`(?[${e}]{4})`;if(o=="day")return`(?[${e}]{1,2})`;if(o=="month")return`(?(?:[${e}]{1,2}|${this.months.pattern}))`;if(o=="weekday")return`(?${this.weekdays.pattern})`}else return`(?[${a}]+?)`})),i="^"+n.join("")+"$";return or.NamedRegExp.create(i)}format(e){return this.formatter.format(e)}formatToParts(e){let t=this.actualNamesPattern,n=this.formatter.format(e),i=t.match(n);if(i.length===0)throw new Error(`${t} did not match ${n}`);let a=i.map(o=>({type:this.getType(o.name,o.value),value:o.value}));return this.collapseLiterals(a)}collapseLiterals(e){for(let t=0;t{"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Ge=k();Ge.__exportStar(Pi(),De);Ge.__exportStar(ut(),De);Ge.__exportStar(Kr(),De);Ge.__exportStar(Pa(),De);Ge.__exportStar(Gr(),De);Ge.__exportStar(Bl(),De);Ge.__exportStar(Nr(),De);Ge.__exportStar(Gl(),De);Ge.__exportStar(Fi(),De)});var ku=v(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.currencies=void 0;vs.currencies={AFN:{decimals:2,symbols:["Afs","\u060B"]},EUR:{decimals:2,symbols:["\u20AC"]},ALL:{decimals:2,symbols:["L"]},DZD:{decimals:2,symbols:["DA"]},USD:{decimals:2,symbols:["$","US$"]},AOA:{decimals:2,symbols:["Kz"]},XCD:{decimals:2,symbols:["EC$","$"]},ARS:{decimals:2,symbols:["$"]},AMD:{decimals:2,symbols:["\u058F"]},AWG:{decimals:2,symbols:["\u0192"]},AUD:{decimals:2,symbols:["A$","AU$","AUD","$"]},AZN:{decimals:2,symbols:["\u20BC","A.M."]},BSD:{decimals:2,symbols:["B$","$"]},BHD:{decimals:3,symbols:["BD"]},BDT:{decimals:2,symbols:["\u09F3"]},BBD:{decimals:2,symbols:["Bds$","$"]},BYN:{decimals:2,symbols:["Br"]},BZD:{decimals:2,symbols:["Bz$","$"]},XOF:{decimals:0,symbols:["F"]},BMD:{decimals:2,symbols:["BD$","$"]},INR:{decimals:2,symbols:["\u20B9","Rs"]},BTN:{decimals:2,symbols:["Nu"]},BOB:{decimals:2,symbols:["Bs"]},BOV:{decimals:2,symbols:[]},BAM:{decimals:2,symbols:["KM"]},BWP:{decimals:2,symbols:["P"]},NOK:{decimals:2,symbols:["kr"]},BRL:{decimals:2,symbols:["R$"]},BND:{decimals:2,symbols:["B$","$"]},BGN:{decimals:2,symbols:["\u043B\u0432.","\u043B\u0432"]},BIF:{decimals:0,symbols:["FBu"]},CVE:{decimals:2,symbols:[]},KHR:{decimals:2,symbols:["\u17DB"]},XAF:{decimals:0,symbols:[]},CAD:{decimals:2,symbols:["C$","CAD$","$","\xA2"]},KYD:{decimals:2,symbols:["CI$","$"]},CLP:{decimals:0,symbols:["CLP$","$"]},CLF:{decimals:4,symbols:[]},CNY:{decimals:2,symbols:["\xA5","\uFFE5"]},COP:{decimals:2,symbols:["COL$","$"]},COU:{decimals:2,symbols:["COU$"]},KMF:{decimals:0,symbols:["CF"]},CDF:{decimals:2,symbols:["CF"]},NZD:{decimals:2,symbols:["NZ$","$"]},CRC:{decimals:2,symbols:["\u20A1"]},HRK:{decimals:2,symbols:["kn"]},CUP:{decimals:2,symbols:["$MN","$"]},CUC:{decimals:2,symbols:["CUC$","$"]},ANG:{decimals:2,symbols:["\u0192","NA\u0192","CMg"]},CZK:{decimals:2,symbols:["K\u010D"]},DKK:{decimals:2,symbols:["kr","kr."]},DJF:{decimals:0,symbols:["Fdj"]},DOP:{decimals:2,symbols:["RD$","$"]},EGP:{decimals:2,symbols:["LE","\xA3"]},SVC:{decimals:2,symbols:[]},ERN:{decimals:2,symbols:["Nfk"]},SZL:{decimals:2,symbols:["E"]},ETB:{decimals:2,symbols:["Br"]},FKP:{decimals:2,symbols:["\xA3"]},FJD:{decimals:2,symbols:["F$","FJ$","$"]},XPF:{decimals:0,symbols:["\u20A3"]},GMD:{decimals:2,symbols:["D"]},GEL:{decimals:2,symbols:["\u20BE"]},GHS:{decimals:2,symbols:["GH\u20B5"]},GIP:{decimals:2,symbols:["\xA3"]},GTQ:{decimals:2,symbols:["Q"]},GBP:{decimals:2,symbols:["\xA3"]},GNF:{decimals:0,symbols:["FG"]},GYD:{decimals:2,symbols:["G$","GY$","$"]},HTG:{decimals:2,symbols:["Gde.","G"]},HNL:{decimals:2,symbols:["L"]},HKD:{decimals:2,symbols:["\u5143","HK$","$"]},HUF:{decimals:2,symbols:["Ft"]},ISK:{decimals:0,symbols:["kr"]},IDR:{decimals:2,symbols:["Rp","Rs"]},XDR:{decimals:0,symbols:[]},IRR:{decimals:2,symbols:["\uFDFC"]},IQD:{decimals:3,symbols:["\u062F.\u0639","ID"]},ILS:{decimals:2,symbols:["\u20AA"]},JMD:{decimals:2,symbols:["J$","$"]},JPY:{decimals:0,symbols:["\u5186","\xA5","\uFFE5"]},JOD:{decimals:3,symbols:["JD"]},KZT:{decimals:2,symbols:["\u20B8"]},KES:{decimals:2,symbols:["Ksh","KSh"]},KPW:{decimals:2,symbols:["\u20A9"]},KRW:{decimals:0,symbols:["\u20A9"]},KWD:{decimals:3,symbols:["KD","\u062F.\u0643"]},KGS:{decimals:2,symbols:["\u20C0"]},LAK:{decimals:2,symbols:["\u20AD"]},LBP:{decimals:2,symbols:["\u0644.\u0644.","LL","\xA3"]},LSL:{decimals:2,symbols:["M"]},ZAR:{decimals:2,symbols:["R"]},LRD:{decimals:2,symbols:["Lib$","L$","$"]},LYD:{decimals:3,symbols:["LD"]},CHF:{decimals:2,symbols:["Fr"]},MOP:{decimals:2,symbols:["MOP$"]},MKD:{decimals:2,symbols:["DEN","\u0434\u0435\u043D"]},MGA:{decimals:2,symbols:["Ar"]},MWK:{decimals:2,symbols:["MK"]},MYR:{decimals:2,symbols:["RM"]},MVR:{decimals:2,symbols:["\u0783","Rf","MRF"]},MRU:{decimals:2,symbols:[]},MUR:{decimals:2,symbols:["\u20A8"]},XUA:{decimals:0,symbols:[]},MXN:{decimals:2,symbols:["$"]},MXV:{decimals:2,symbols:[]},MDL:{decimals:2,symbols:["L"]},MNT:{decimals:2,symbols:["\u20AE"]},MAD:{decimals:2,symbols:["DH"]},MZN:{decimals:2,symbols:["MT","MTn"]},MMK:{decimals:2,symbols:["K"]},NAD:{decimals:2,symbols:["N$","$"]},NPR:{decimals:2,symbols:["N\u20A8","\u0930\u0941","\u20A8","Re"]},NIO:{decimals:2,symbols:["C$"]},NGN:{decimals:2,symbols:["\u20A6"]},OMR:{decimals:3,symbols:["\u0631.\u0639."]},PKR:{decimals:2,symbols:["\u20A8","Rs"]},PAB:{decimals:2,symbols:["B/."]},PGK:{decimals:2,symbols:["K"]},PYG:{decimals:0,symbols:["\u20B2"]},PEN:{decimals:2,symbols:["S/."]},PHP:{decimals:2,symbols:["\u20B1"]},PLN:{decimals:2,symbols:["z\u0142"]},QAR:{decimals:2,symbols:["QR"]},RON:{decimals:2,symbols:["lei"]},RUB:{decimals:2,symbols:["\u20BD"]},RWF:{decimals:0,symbols:["FRw"]},SHP:{decimals:2,symbols:["\xA3"]},WST:{decimals:2,symbols:["WS$"]},STN:{decimals:2,symbols:["Db","\u20A1"]},SAR:{decimals:2,symbols:["SR"]},RSD:{decimals:2,symbols:["\u0434\u0438\u043D","din"]},SCR:{decimals:2,symbols:["SRe"]},SLL:{decimals:2,symbols:["Le"]},SLE:{decimals:2,symbols:["Le"]},SGD:{decimals:2,symbols:["S$","$"]},XSU:{decimals:0,symbols:["Sucre"]},SBD:{decimals:2,symbols:["$","SI$"]},SOS:{decimals:2,symbols:["Sh.So."]},SSP:{decimals:2,symbols:["Db","\xA3"]},LKR:{decimals:2,symbols:["Rs","\u0DBB\u0DD4","\u0BB0\u0BC2"]},SDG:{decimals:2,symbols:["\u062C.\u0633","sud\xA3","\xA3"]},SRD:{decimals:2,symbols:["$"]},SEK:{decimals:2,symbols:["kr"]},CHE:{decimals:2,symbols:[]},CHW:{decimals:2,symbols:[]},SYP:{decimals:2,symbols:["syr\xA3","LS","\xA3"]},TWD:{decimals:2,symbols:["NT$","$"]},TJS:{decimals:2,symbols:["SM"]},TZS:{decimals:2,symbols:["TSh"]},THB:{decimals:2,symbols:["\u0E3F"]},TOP:{decimals:2,symbols:["T$"]},TTD:{decimals:2,symbols:["TT$","$"]},TND:{decimals:3,symbols:["DT"]},TRY:{decimals:2,symbols:["YTL","\u20BA"]},TMT:{decimals:2,symbols:["T"]},UGX:{decimals:0,symbols:["Ush"]},UAH:{decimals:2,symbols:["\u20B4"]},AED:{decimals:2,symbols:["DH","\u062F.\u0625","Dhs"]},USN:{decimals:2,symbols:[]},UYU:{decimals:2,symbols:["$U","$"]},UYI:{decimals:0,symbols:[]},UYW:{decimals:4,symbols:[]},UZS:{decimals:2,symbols:["So'm"]},VUV:{decimals:0,symbols:["VT"]},VES:{decimals:2,symbols:["Bs.S"]},VED:{decimals:2,symbols:[]},VND:{decimals:0,symbols:["\u20AB","\u0111"]},YER:{decimals:2,symbols:["\uFDFC'"]},ZMW:{decimals:2,symbols:["K","ZK"]},ZWL:{decimals:2,symbols:[]},XBA:{decimals:0,symbols:[]},XBB:{decimals:0,symbols:[]},XBC:{decimals:0,symbols:[]},XBD:{decimals:0,symbols:[]},XTS:{decimals:0,symbols:[]},XXX:{decimals:0,symbols:[]},XAU:{decimals:0,symbols:[]},XPD:{decimals:0,symbols:[]},XPT:{decimals:0,symbols:[]},XAG:{decimals:0,symbols:[]},ADP:{symbols:["Pta"],decimals:2}}});var Eu=v(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.PreferredCurrencies=void 0;var U=class{static dollarSymbol(e){return e&&U.dollarCountries[e]||"USD"}static poundSymbol(e){return e&&U.poundCountries[e]||"GBP"}static yenSymbol(e){return e&&U.yenCountries[e]||"JPY"}static kroneSymbol(e){return e&&U.kroneCountries[e]||"DKK"}static rupeeSymbol(e){return e&&U.rupeeCountries[e]||"INR"}static for(e){return[U.dollarSymbol(e),U.poundSymbol(e),U.yenSymbol(e),U.kroneSymbol(e),U.rupeeSymbol(e)]}};s(U,"PreferredCurrencies");Ss.PreferredCurrencies=U;U.dollarCountries={AG:"XCD",AR:"ARS",AU:"AUD",BS:"BSD",BB:"BBD",BZ:"BZD",BM:"BMD",BN:"BND",CA:"CAD",CO:"COP",CL:"CLP",CU:"CUP",DM:"XCD",DO:"DOP",EC:"USD",FM:"USD",KY:"KYD",FJ:"FJD",GD:"XCD",GY:"GYD",HK:"HKD",JM:"JMD",KI:"AUD",KN:"XCD",LC:"XCD",LR:"LRD",MH:"USD",MX:"MXN",NA:"NAD",NZ:"NZD",SG:"SGD",SB:"SBD",SR:"SRD",SV:"USD",TL:"USD",TW:"TWD",TT:"TTD",TV:"AUD",US:"USD",UY:"UYU",VC:"XCD",ZW:"USD"};U.poundCountries={EG:"EGP",FK:"FKP",GB:"GBP",GI:"GIP",GG:"GBP",IM:"GBP",JE:"GBP",LB:"LBP",SH:"SHP",SS:"SSP",SD:"SDG",SY:"SYP"};U.yenCountries={CN:"CNY",JP:"JPY"};U.kroneCountries={DK:"DKK",FO:"DKK",GL:"DKK",IS:"ISK",NO:"NOK",SE:"SEK"};U.rupeeCountries={IN:"INR",ID:"IDR",MU:"MUR",NP:"NPR",PK:"PKR",LK:"LKR"}});var Ga=v(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.infer=yr.prefer=void 0;var Mu=Ur(),vy=Eu();function Sy(...r){if(r.filter(Boolean).length!==0)return(e,t)=>{let n=e.lookup(t)||[],i=(0,Mu.unique)(n.map(a=>a.value));if(i.length!==0)return i.length===1?i[0]:i.find(a=>r.indexOf(a)!==-1)}}s(Sy,"prefer");yr.prefer=Sy;function xy(r){return r?r.split(/[-_]/).filter(Boolean):[]}s(xy,"localeParts");function Dy(r){let[,e]=xy(r),t=vy.PreferredCurrencies.for(e);return(n,i)=>{let a=n.lookup(i)||[],o=(0,Mu.unique)(a.map(l=>l.value));if(o.length===0)return;if(o.length===1)return o[0];let c=o.filter(l=>l.startsWith(e));return c.length===1?c[0]:o.find(l=>t.indexOf(l)!==-1)}}s(Dy,"infer");yr.infer=Dy});var Hu=v(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.IntegerGroupParser=D.PartsFromFormat=D.NumberFormatPartParser=D.MoneyParser=D.RegexBuilder=D.symbolFor=D.CurrencySymbols=D.parseToParts=D.parser=D.parse=D.FormatToParts=D.toPartsPonyfill=D.format=D.partsFrom=D.hasNativeToParts=D.Formatter=D.decimalsFor=D.moneyFrom=D.money=void 0;var mt=k(),nt=Be(),fe=G(),xs=Q(),Na=ku(),Iu=He(),za=Mi(),an=ce(),Cy=Br(),on=ne(),me=Ce(),Py=Ga();function Ds(r,e){return{amount:e,currency:r}}s(Ds,"money");D.money=Ds;function Wa(r,e,t){let{currency:n}=(0,fe.single)(r,(0,fe.filter)(l=>l.type==="currency"),(0,fe.flatMap)(l=>{try{let f=V.get(e).parse(l.value,t&&t.strategy);return[{currency:f,exactMatch:f===l.value}]}catch(f){return[]}}),(0,fe.sort)((0,xs.by)("exactMatch",xs.descending)),(0,fe.first)()),i=r.filter(l=>l.type==="integer"||l.type==="decimal"||l.type==="fraction"),a=(0,Cy.get)(()=>r.filter(l=>l.type==="decimal")[0].value,"."),o=i.map(l=>l.value).join(""),c=(0,me.numberParser)(a,e).parse(o);return Ds(n,c)}s(Wa,"moneyFrom");D.moneyFrom=Wa;function _u(r){let e=Na.currencies[r];return e?e.decimals:2}s(_u,"decimalsFor");D.decimalsFor=_u;var Fe=class{static create(e,t,n="code"){return new Intl.NumberFormat(t,{currencyDisplay:n,currency:e,style:"currency",minimumFractionDigits:0,maximumFractionDigits:_u(e)})}};s(Fe,"Formatter");mt.__decorate([an.cache],Fe,"create",null);D.Formatter=Fe;D.hasNativeToParts=typeof Intl.NumberFormat.prototype.formatToParts=="function";function Va(r,e,t="code",n=D.hasNativeToParts){let i=Fe.create(r.currency,e,t);return n?i.formatToParts(r.amount):Fu(r,e,t)}s(Va,"partsFrom");D.partsFrom=Va;function Ay(r,e,t="code"){return Fe.create(r.currency,e,t).format(r.amount)}s(Ay,"format");D.format=Ay;function Fu(r,e,t="code"){let n=r.currency,i=r.amount;return yt.create(n,e,t).format(i)}s(Fu,"toPartsPonyfill");D.toPartsPonyfill=Fu;var ju=Ds("GBP",111222.3333),yt=class{constructor(e,t,n,i){this.currency=e,this.currencyDisplay=t,this.parser=n,this.locale=i}static create(e,t,n="code"){let i=Fe.create(e,t,n).format(ju.amount),a=je.examplePattern(t).parse(i),o=cn.buildFrom(a,t),c=gt.create(t,o);return new yt(e,n,c,t)}format(e){let t=Fe.create(this.currency,this.locale,this.currencyDisplay);return this.parser.parse(t.format(e))}};s(yt,"FormatToParts");mt.__decorate([an.cache],yt,"create",null);D.FormatToParts=yt;function Ty(r,e,t){return Wa(Lu(r,e,t),e,t)}s(Ty,"parse");D.parse=Ty;function Oy(r,e){return Cs.create(r,e)}s(Oy,"parser");D.parser=Oy;function Lu(r,e,t){return gt.create(e,t).parse(r)}s(Lu,"parseToParts");D.parseToParts=Lu;var V=class extends me.DatumLookup{constructor(e,t){super(e.map(n=>({name:(0,me.cleanValue)(n.name),value:n.value})),xs.ascending);this.locale=t}static get(e,t=[]){return V.cache[e]=V.cache[e]||V.create(e,t)}static set(e,t){return V.cache[e]=t}static create(e,t=[]){return new V([...V.generateData(e),...t],e)}static generateData(e){return Object.keys(Na.currencies).flatMap(t=>V.dataFor(e,t,Na.currencies[t]))}static dataFor(e,t,n){return[{name:t,value:t},{name:qu(e,t),value:t},...(0,on.array)(n.symbols,(0,fe.flatMap)(i=>{let a=[{name:i,value:t}];if(V.generateAdditionalSymbols.indexOf(i)!==-1){let o=t.substring(0,2);a.push({name:i+o,value:t}),a.push({name:o+i,value:t}),a.push({name:t+i,value:t})}return a}))]}parse(e,t=(0,Py.infer)(this.locale)){return super.parse((0,me.cleanValue)(e),t)}};s(V,"CurrencySymbols");D.CurrencySymbols=V;V.cache={};V.generateAdditionalSymbols=["$","\xA5","\xA3"];var Ry=/GBP|£GB|GB£|UK£|£UK/;function qu(r,e,t=D.hasNativeToParts){if(t){let n=Va(Ds(e,0),r,"symbol"),[i]=n.filter(a=>a.type==="currency");if(!i)throw new Error("No currency found");return me.Spaces.remove(i.value)}else{let n=Fe.create("GBP",r,"symbol").format(1).replace(Ry,"@@@"),i=Fe.create(e,r,"symbol").format(1),[,a]=(0,nt.different)([n,i]);return a?me.Spaces.remove(a):"\xA3"}}s(qu,"symbolFor");D.symbolFor=qu;var cn=class{static buildFromOptions(e,t){return t&&t.format?this.buildFrom(je.format.parse(t.format),e,!0):this.buildPattern(e,t&&t.strict||!1)}static buildPattern(e,t=!1){return this.buildFrom(Va(ju,e),e,t)}static buildFrom(e,t,n=!1){let i=this.buildParts(e,n),[a=""]=e.filter(l=>l.type==="group").map(l=>l.value),o=me.Numerals.get(t).pattern,c=i.map(l=>{switch(l.type){case"currency":return`(?${V.get(t).pattern})?`;case"decimal":return`(?[${l.value}]?)`;case"fraction":return`(?[${o}]*)`;case"integer":return`(?[${o}${me.Spaces.handle(a)}]*[${o}]+)`;default:return`(?<${l.type}>[${me.Spaces.handle(l.value)}]?)`}}).join("");return(0,me.atBoundaryOnly)(c)}static buildParts(e,t=!1){let n=[...e];if(!t){let i=n[0],a=n[n.length-1],o={type:"literal",value:" "};i.type==="currency"?(n.push(o,i),n.splice(1,0,o)):a.type==="currency"&&(n.unshift(a,o),n.splice(n.length-2,0,o))}return(0,on.array)(n,(0,fe.filter)(i=>i.type!=="group"),(0,fe.dedupe)((0,xs.by)("type")))}};s(cn,"RegexBuilder");D.RegexBuilder=cn;var Cs=class{static create(e,t){return(0,za.mappingParser)(gt.create(e,t),n=>Wa(n,e,t))}};s(Cs,"MoneyParser");D.MoneyParser=Cs;var gt=class{static create(e,t){let n=typeof t=="string"?t:cn.buildFromOptions(e,t);return(0,za.mappingParser)((0,za.namedRegexParser)(nt.NamedRegExp.create(n)),i=>this.convert(i,e))}static convert(e,t){return(0,on.array)(e,(0,fe.filter)(n=>Boolean(n.value)),(0,fe.flatMap)(n=>n.name==="integer-group"?Pe.digits(t).parse(n.value):[{type:n.name,value:n.value}]))}};s(gt,"NumberFormatPartParser");mt.__decorate([an.cache],gt,"create",null);D.NumberFormatPartParser=gt;var je=class{constructor(e,t){this.formatRegex=e,this.integerGroupParser=t}parse(e){return(0,on.array)(this.formatRegex.iterate(e),(0,fe.flatMap)(t=>{if((0,nt.isNamedMatch)(t)){let[n,i,a]=t.filter(o=>Boolean(o.value));if(n.name==="currency")return[{type:n.name,value:n.value}];{let o=this.integerGroupParser.parse(n.value);return i?[...o,{type:i.name,value:i.value},{type:a.name,value:a.value}]:o}}else return[{type:"literal",value:t}]}))}static get format(){let e=nt.NamedRegExp.create("(?:(?(?:i.*i|i))(?:(?[^f])(?f+))?|(?C+))");return new je(e,Pe.integerFormat)}static examplePattern(e){let t=me.Numerals.get(e),n=nt.NamedRegExp.create(`(?:(?${t.format(1)}.*${t.format(2)})(?:(?.)(?${t.format(3)}+))?|(?${V.get(e).pattern}))`);return new je(n,Pe.digits(e))}};s(je,"PartsFromFormat");mt.__decorate([Iu.lazy],je,"format",null);mt.__decorate([an.cache],je,"examplePattern",null);D.PartsFromFormat=je;var Pe=class{constructor(e){this.regex=e}parse(e){return(0,on.array)(this.regex.iterate(e),(0,fe.map)(t=>(0,nt.isNamedMatch)(t)?{type:"integer",value:t[0].value}:{type:"group",value:t}))}static digits(e){return new Pe(nt.NamedRegExp.create(`(?[${me.Numerals.get(e).pattern}]+)`))}static get integerFormat(){return new Pe(nt.NamedRegExp.create("(?i+)"))}};s(Pe,"IntegerGroupParser");mt.__decorate([an.cache],Pe,"digits",null);mt.__decorate([Iu.lazy],Pe,"integerFormat",null);D.IntegerGroupParser=Pe});var Xa=v(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.implicitMoneyParser=ye.findDecimalSeparator=ye.flexibleMoneyParser=ye.FlexibleMoneyParser=ye.flexibleParse=void 0;var Ku=k(),gr=Hu(),ky=Mi(),Ja=Be(),ht=G(),Uu=Q(),Ey=Ur(),My=ce(),Iy=He(),_y=Br(),Fy=ne(),Ae=Ce(),Bu=Ga();function jy(r,e="en",t){return new Ne(e,t).parse(r)}s(jy,"flexibleParse");ye.flexibleParse=jy;var Ne=class{constructor(e,t){this.locale=e,this.options=t}get pattern(){return Ne.patternFor(this.locale)}static patternFor(e){return Ja.NamedRegExp.create((0,Ae.atBoundaryOnly)(`(?${gr.CurrencySymbols.get(e).pattern})?(?[${Ae.Spaces.spaces}])?(?${(0,Ae.numberPattern)(e)})(?[${Ae.Spaces.spaces}])?(?${gr.CurrencySymbols.get(e).pattern})?`))}parse(e){try{return this.parseSingle(this.pattern.match((0,Ja.removeUnicodeMarkers)(e)))}catch(t){throw new Error(`Unable to parse ${e}`)}}parseAll(e){return(0,Fy.array)(this.pattern.exec((0,Ja.removeUnicodeMarkers)(e)),(0,Ae.mapIgnoreError)(t=>this.parseSingle(t)))}parseSingle(e){let{currency:t}=(0,ht.single)(e,(0,ht.filter)(a=>a.name==="currency"&&a.value!==void 0),(0,ht.flatMap)(a=>{try{let o=gr.CurrencySymbols.get(this.locale).parse(a.value,this.options&&this.options.strategy||(0,Bu.infer)(this.locale));return[{currency:o,exactMatch:o===a.value}]}catch(o){return[]}}),(0,ht.sort)((0,Uu.by)("exactMatch",Uu.descending)),(0,ht.first)()),n=(0,ht.single)(e,(0,ht.find)(a=>a.name==="number"&&a.value!==void 0)).value,i=(0,Ae.numberParser)(this.options&&this.options.decimalSeparator||Ya(t,n),this.locale);return(0,gr.money)(t,i.parse(n))}};s(Ne,"FlexibleMoneyParser");Ku.__decorate([Iy.lazy],Ne.prototype,"pattern",null);Ku.__decorate([My.cache],Ne,"patternFor",null);ye.FlexibleMoneyParser=Ne;function Ly(r="en",e){return new Ne(r,e)}s(Ly,"flexibleMoneyParser");ye.flexibleMoneyParser=Ly;function $u(r){return r==="."?",":"."}s($u,"flip");function Ya(r,e){let t=(0,Ae.separatorsOf)(e);if(t.length===0)return".";let n=t[t.length-1],i=e.length-e.lastIndexOf(n)-1,a=(0,gr.decimalsFor)(r);if(t.length===1){if(i===3){if(a===3)throw new Error(`Can not parse ${e} as separator is ambiguous`);return $u(n)}return(0,Ae.decimalSeparator)(n)}return(0,Ey.unique)(t).length===1?$u(n):(0,Ae.decimalSeparator)(n)}s(Ya,"findDecimalSeparator");ye.findDecimalSeparator=Ya;var Za=class{constructor(e,t,n=new Ae.NumberParser(i=>(0,_y.get)(()=>Ya(e,i),(0,Ae.inferDecimalSeparator)(t)),t)){this.currency=e,this.parser=n}parse(e){let t=this.parser.parse(e);return{currency:this.currency,amount:t}}parseAll(e){return this.parser.parseAll(e).map(t=>({amount:t,currency:this.currency}))}};s(Za,"ImplicitMoneyParser");function qy({currency:r,locale:e="en",strategy:t=(0,Bu.infer)(e)}){return r?new Za(gr.CurrencySymbols.get(e).parse(r,t),e):new ky.FailParser}s(qy,"implicitMoneyParser");ye.implicitMoneyParser=qy});var dc=E(G()),pc=E(Q()),wp=E(G());function vp(r){switch(typeof r){case"undefined":return!0;case"string":return r.trim()==="";case"number":return isNaN(r);case"object":{if(r==null)return!0;if(y.isObject(r))return Object.keys(r).length===0;if(Array.isArray(r))return r.length===0}}return!1}s(vp,"isEmpty");var Ke=class{static parse(e){if(typeof e!="number"&&q.isEmpty(e))return;let t=Number(e);if(!isNaN(t))return t}static isNumber(e){return typeof e=="number"&&!isNaN(e)}};s(Ke,"Numbers");var Bt=class{static noWhitespace(e){return e&&typeof e=="string"?e.replace(/\s+/g,""):""}static startWith(e,t){return e?e.substring(0,t.length)===t:e===t}static endsWith(e,t){return e.substring(e.length-t.length,e.length)===t}static isEmpty(e){return e===void 0||e===null?!0:e.trim().length===0}static isEmail(e){return typeof e=="string"&&this.validEmailPattern.test(e)}static isLowerCase(e){return e===e.toLowerCase()&&e!==e.toUpperCase()}static isUpperCase(e){return e===e.toUpperCase()&&e!==e.toLowerCase()}static kebabCase(e){return Bt.delimiterCase(e,"-")}static snakeCase(e){return Bt.delimiterCase(e,"_")}static delimiterCase(e,t){return e.replace(/([A-Z][a-z]+|\d+)/gm,`${t}$1`).replace(new RegExp(`^${t}`),"").toLowerCase()}static titleCase(e){return Bt.isEmpty(e)?"":e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase())}static camelCase(e){return Bt.isEmpty(e)?"":e.replace(/([A-Za-z]+|\d+)/gm,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()).replace(new RegExp("^."),t=>t.toLowerCase()).replace(new RegExp(/[_\-\s]/g),"")}},q=Bt;s(q,"Strings"),q.validEmailPattern=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/;function Rr(r,e,t){if(e(r))return t(r);switch(typeof r){case"undefined":return;case"object":{if(r===null)return null;if(Array.isArray(r))return r.map(n=>Rr(n,e,t));if(y.isObject(r))return y.keys(r).sort().reduce((n,i)=>{let a=r[i];return n[i]=Rr(a,e,t),n},{})}}return r}s(Rr,"walkValues");function Nn(r,e){switch(typeof r){case"undefined":return;case"object":{if(r===null)return null;if(Array.isArray(r))return r.map(t=>Nn(t,e));if(y.isObject(r))return y.keys(r).sort().reduce((t,n)=>{let i=r[n];return t[e(String(n))]=Nn(i,e),t},{})}}return r}s(Nn,"walkKeys");var y=class{static isObject(e){return e&&typeof e=="object"&&(e.constructor===Object||/Object.*native/.test(e.constructor.toString()))}static keys(e){return Object.keys(e)}static values(e){return Object.keys(e).map(t=>e[t])}static entries(e){return Object.keys(e).map(t=>[t,e[t]])}static removeEmpty(e){return e&&(y.isObject(e)?Object.keys(e).reduce((t,n)=>{let i=y.removeEmpty(e[n]);return vp(i)||(t[n]=i),t},{}):e)}static sort(e){return e&&(Array.isArray(e)?e.map(y.sort):y.isObject(e)?Object.keys(e).sort().reduce((t,n)=>{let i=e[n];return t[n]=y.sort(i),t},{}):e)}static toLowerCase(e){return typeof e=="string"?e.toLowerCase():Array.isArray(e)?e.map(y.toLowerCase):m(()=>y.isObject(e))?Object.entries(e).reduce((t,[n,i])=>(t[n]=y.toLowerCase(i),t),{}):e}static snakeCase(e){return Nn(e,q.snakeCase)}static camelCase(e){return Nn(e,q.camelCase)}static filter(e,t){let n=y.keys(e).filter(t);return y.pick(e,...n)}static omit(e,...t){return t.reduce((n,i)=>(Reflect.deleteProperty(n,i),n),e)}static pick(e,...t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}};s(y,"Objects");var A=class{static from(e){return Array.from(e)}static find(e,t){if(e.find)return e.find(t);let[n]=e.filter(t);return n}static findLastIndex(e,t){let n=[...e].reverse().findIndex(t);return n===-1?n:e.length-n-1}static toObject(e){return e.reduce((t,n)=>(Object.keys(n).forEach(i=>{i in t||(t[i]=n[i])}),t),{})}static flatten(e){return e.reduce((t,n)=>t.concat(n),[])}static flatMap(e,t){return e.flatMap?e.flatMap(t):A.flatten(e.map(t))}static unique(e){return Array.from(new Set(e))}static clean(e){return e.filter(Boolean)}static trim(e){return e.map(t=>t.trim())}static includes(e,t){return"includes"in e?e.includes(t):e.indexOf(t)!==-1}static first(e){return e[0]}static last(e){return e[e.length-1]}static safeReverse(e){return e?e.slice().reverse():[]}static shuffle(e){return e.map(t=>({value:t,order:Math.random()})).sort((0,pc.by)("order")).map(({value:t})=>t)}};s(A,"Arrays");var zn=class{static path(e){let t=[e];for(;e.parentElement;)e=e.parentElement,t.push(e);return t}};s(zn,"Elements");function m(r,e=void 0){try{let t=r();return typeof t=="undefined"?e:t}catch(t){return e}}s(m,"get");function Sp(r,e){let t=e.toLowerCase(),n=A.find(Object.keys(r),a=>a.toLowerCase()===t);if(!n)return;let i=r[n];return typeof i=="string"?i.trim():i}s(Sp,"getValue");function Wn(r,...e){if(!r)return[];if(Array.isArray(r))return A.clean(A.flatten(r.map(t=>Wn(t,...e))));if(typeof r=="object"){let[t,...n]=e,i=Sp(r,t);return typeof i=="object"?Wn(i,...n):n.length===0&&Boolean(i)?[i]:[]}return[]}s(Wn,"getAll");var ie=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof module!="undefined"?module:Function("return this")())();function Vn(r,e,t){let n=r[e];return typeof n=="undefined"?r[e]=t:Array.isArray(n)?n.indexOf(t)==-1&&n.push(t):r[e]=[n,t],r}s(Vn,"accumulateMultipleValues");function xp(r,e,t,n=i=>i){let i=[],a=0,o;for(;(o=r.exec(e))!=null;)i.push(n(e.substring(a,o.index))),i.push(t(o)),a=r.lastIndex;return i.push(n(e.substring(a))),i.join("")}s(xp,"regexReplace");function fc(r){return xp(/\w+/g,r,e=>Dp(e[0]))}s(fc,"titleCase");function Dp(r){return r.substr(0,1).toUpperCase()+r.substr(1).toLowerCase()}s(Dp,"caseWord");function mc(r,e){return r.slice(0,e)}s(mc,"limit");function yc(r){return m(()=>A.last(r.constructor.name.split("$")),"")}s(yc,"getClassName");var gc=E(ce()),hc=E(He());function de(r=ie){return r.triptease=r.triptease||{},r.triptease.onboard=r.triptease.onboard||{},{triptease:r.triptease,onboard:r.triptease.onboard}}s(de,"globalObjects");var ot;(function(n){n.Native="native",n.NonNative="non-native",n.NotImplemented="not-implemented"})(ot||(ot={}));function bc(r,e){return m(()=>e.split(".").reduce((t,n)=>t[n],r))}s(bc,"getProperty");function Ap(r){return r==null?ot.NotImplemented:typeof r=="function"?r.toString().includes("native code")?ot.Native:ot.NonNative:ot.Native}s(Ap,"isNative");var Jn=class{static exposeApi(){let e=de(ie).triptease;e.native||(e.native=Jn)}static getProperty(e){let t=bc(ie,e);return Ap(t)!==ot.NonNative?t:bc(Jn.window,e)}static get window(){let e=ie;if(!e.document)return e;try{let t=e.document,n=t.querySelector("[name='triptease.native']");if(n)return n.contentWindow;let i=t.createElement("iframe");return i.style.display="none",i.setAttribute("title","blank"),i.setAttribute("aria-hidden","true"),i.setAttribute("name","triptease.native"),t.documentElement.appendChild(i),i.contentWindow}catch(t){return e}}},Y=Jn;s(Y,"Native"),qe([gc.cache],Y,"getProperty",1),qe([hc.lazy],Y,"window",1);var Tp=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}\.\d{3}Z)?$/;function Op(r){return Rr(r,e=>typeof e=="string"&&Tp.test(e),e=>{let t=new Date(e);return isNaN(t.valueOf())?e:t})}s(Op,"convertDates");var Rp=Y.getProperty("JSON.parse"),wc=Y.getProperty("JSON.stringify"),kp=Y.getProperty("Date.prototype.toISOString"),Ep=Y.getProperty("atob"),Mp=Y.getProperty("btoa"),B=class{static parse(e){return Rp(e)}static parseWithDates(e){return Op(B.parse(e))}static stringify(e){return wc(this.clean(e))}static clean(e){return Rr(e,t=>{let n=typeof t;switch(n){case"undefined":case"string":case"number":case"boolean":return!0;case"object":{if(t===null)return!0;if(Array.isArray(t)||y.isObject(t))return!1;if("toJSON"in t)return!0}}throw new Error(`Illegal JsonValue: ${n} ${t} `)},t=>t instanceof Date?kp.call(t):t)}static atob(e){try{let t=Ep(e);return B.parseWithDates(t)}catch(t){}}static btoa(e){try{if(!y.isObject(e))return;let t=wc(e);return Mp(t)}catch(t){}}};s(B,"Json");var I=class{static same(e,t){return B.stringify(e)===B.stringify(t)}static isSuperset(e,t){return e===null||t===null?I.same(e,t):Array.isArray(e)&&Array.isArray(t)?e.length>t.length?!1:e.every(n=>t.some(i=>I.isSuperset(n,i))):m(()=>y.isObject(e))&&m(()=>y.isObject(t))?Object.keys(e).reduce((n,i)=>n&&I.isSuperset(e[i],t[i]),!0):I.same(e,t)}static compress(e){let t=I.groupValues(e);return this.compressGrouped(t)}static compressGrouped(e){return Object.entries(e).reduce(({shared:t,unique:n},[i,a])=>{if(m(()=>y.isObject(a))){let o=I.compressGrouped(a);Object.keys(o.shared).length>0&&(t[i]=o.shared),o.unique.forEach((c,l)=>{n[l]=n[l]||{},Object.keys(c).length>0&&(n[l][i]=c)})}return Array.isArray(a)&&a.forEach((o,c)=>{n[c]=n[c]||{},A.unique(a.map(l=>B.stringify(l))).length===1?t[i]=o:o!==void 0&&(n[c][i]=o)}),{shared:t,unique:n}},{shared:{},unique:[]})}static groupValues(e){let t=Array.from(e.reduce((o,c)=>Object.keys(c).reduce((l,f)=>l.add(f),o),new Set)),[n,i]=e.reduce((o,c)=>t.reduce(([l,f],h)=>{let P=c[h];return m(()=>y.isObject(P))?(f[h]=f[h]||[],f[h].push(P)):(l[h]=l[h]||[],l[h].push(P)),[l,f]},o),[{},{}]),a=Object.entries(i).reduce((o,[c,l])=>(o[c]=I.groupValues(l),o),{});return g(g({},n),a)}static decompress(e){return e.unique.map(t=>this.merge(e.shared,t))}static merge(e,t){return[...Object.keys(e),...Object.keys(t)].reduce((i,a)=>{let o=e[a],c=t[a];return m(()=>y.isObject(o))&&m(()=>y.isObject(c))?i[a]=I.merge(o,c):i[a]=c!=null?c:o,i},{})}};s(I,"JsonValues");function le(r,e=!0){return r?(r.indexOf("?")==0&&(r=r.substring(1,r.length)),r.split("&").map(function(t){return t.split("=")}).reduce(function(t,n){let i=n[0],a=n[1];if(!i)return t;let o=vc(a),c=e?Ip(o):o;return Vn(t,vc(i),c)},{})):{}}s(le,"queryObject");function vc(r){return m(()=>decodeURIComponent(r.replace(/\+/g,"%20")),r)}s(vc,"decode");function Ip(r){try{return B.parse(r)}catch(e){return r}}s(Ip,"coerce");var Us=class{constructor(e){let t=Us.RFC_3986.exec(e);if(!t)throw new Error(`Invalid Uri: ${e}`);let[,,n,,i,a,,o,,c]=t;this.scheme=n,this.authority=i?new Yn(i):void 0,this.path=a,this.query=o,this.fragment=c}toString(){let e=[];return typeof this.scheme!="undefined"&&e.push(this.scheme,":"),typeof this.authority!="undefined"&&e.push("//",this.authority.toString()),e.push(this.path),typeof this.query!="undefined"&&e.push("?",this.query),typeof this.fragment!="undefined"&&e.push("#",this.fragment),e.join("")}get host(){return this.authority&&this.authority.host}get port(){return this.authority&&this.authority.port}get userInfo(){return this.authority&&this.authority.userInfo}},N=Us;s(N,"Uri"),N.RFC_3986=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var Bs=class{constructor(e){let t=Bs.RFC_3986.exec(e);if(!t)throw new Error(`Invalid Authority: ${e}`);let[,n,i,a]=t;this.userInfo=n,this.host=i,this.port=a}toString(){let e=[];return typeof this.userInfo!="undefined"&&e.push(this.userInfo,"@"),typeof this.host!="undefined"&&e.push(this.host),typeof this.port!="undefined"&&e.push(":",this.port),e.join("")}},Yn=Bs;s(Yn,"Authority"),Yn.RFC_3986=/(?:([^@]+)@)?([^:]+)(?::([\d]+))?/;var Sc=Y.getProperty("console.log"),_p=Y.getProperty("console.error"),Fp=Y.getProperty("console.debug"),$s=class{constructor(e=Sc,t=_p,n=Fp||Sc){this.log=e;this.error=t;this.debug=n}};s($s,"ConsoleLogger");var kr=class{constructor(){this.log=s(()=>{},"log");this.error=s(()=>{},"error");this.debug=s(()=>{},"debug")}};s(kr,"NoOpLogger");var xc="triptease-debug",jp=256;function Gs(r,e=xc){let t=m(()=>{var n;return le((n=r.location)==null?void 0:n.search,!1)[e]})||m(()=>{var n;return le(new N((n=r.location)==null?void 0:n.originalHref).query,!1)[e]})||m(()=>{var n,i;return(i=(n=r.process)==null?void 0:n.env)==null?void 0:i.DEBUG})||m(()=>{var n;return((n=r.localStorage)==null?void 0:n.getItem)&&r.localStorage.getItem(e)})||m(()=>{var n;return((n=r.sessionStorage)==null?void 0:n.getItem)&&r.sessionStorage.getItem(e)})||"";return m(()=>t.substring(0,jp),"")}s(Gs,"globalParameter");function Lp(r){return Gs(r,xc).split(",").map(e=>e.trim())}s(Lp,"debugPatterns");function Dc(r){let e=r.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$")}s(Dc,"wildcardToRegexp");function qp(r,e=ie){try{let t=Lp(e),n=t.filter(i=>i[0]==="!").map(i=>i.substr(1));return n.length>0?!n.some(i=>Dc(i).test(r)):t.some(i=>i==="true"||Dc(i).test(r))}catch(t){return!1}}s(qp,"nameMatches");var ct;(function(n){n[n.DEBUG=0]="DEBUG",n[n.INFO=1]="INFO",n[n.ERROR=2]="ERROR"})(ct||(ct={}));var Ns=class{constructor(e,t,n=new $s){this.name=e;this.logLevel=t;this.console=n}debug(e,...t){this.logLevel.valueOf()>0||this.console.debug(`[${this.name}] ${e}`,...t)}log(e,...t){this.logLevel.valueOf()>1||this.console.log(`[${this.name}] ${e}`,...t)}error(e,...t){this.logLevel.valueOf()>2||this.console.error(`[${this.name}] ${e}`,...t)}};s(Ns,"NamedLogger");function M(r,e=ie){let t=m(()=>{var n,i,a;return ct[((a=(i=(n=e.process)==null?void 0:n.env)==null?void 0:i.LOG_LEVEL)==null?void 0:a.toUpperCase())||"DEBUG"]},0);return qp(r,e)?new Ns(r,t):new kr}s(M,"namedLogger");var $g=new Set(["Unknown","PossibleIdentifier"]),Zn=new Set(["HotelName","HotelCode","ChainCode"]);function zs(r){return r&&typeof r=="object"&&r.constructor===Object&&typeof r["@type"]=="string"}s(zs,"isStructuredData");function Cc(r,e){return zs(r)&&(typeof e=="function"?e(r["@type"]):r["@type"]===e)}s(Cc,"isStructuredDataType");function Pc(r){return Cc(r,"LodgingReservation")}s(Pc,"isLodgingReservation");var Re={cookieBot:"cookieBot",klaro:"klaro",google:"google",defaultNoConsentMode:"defaultNoConsentMode",defaultAutoConsentMode:"defaultAutoConsentMode"};function Ac(r){return r&&typeof r=="object"&&r.checkin instanceof Date&&r.checkout instanceof Date}s(Ac,"hasSearchDates");var S;(function(f){f.Search="Search",f.RoomsAndRates="RoomsAndRates",f.Confirmation="Confirmation",f.Checkout="Checkout",f.Payment="Payment",f.Group="Group",f.Advert="Advert",f.Partial="Partial",f.Unknown="Unknown"})(S||(S={}));var Hp=[S.Payment,S.Confirmation,S.RoomsAndRates,S.Checkout,S.Search,S.Partial,S.Group,S.Unknown,S.Advert];function Tc(r){return Hp.indexOf(r)}s(Tc,"pageRanking");var Ue;(function(a){a.Room="Room",a.Fee="Fee",a.Tax="Tax",a.CityTax="CityTax",a.Unknown="Unknown"})(Ue||(Ue={}));var ke;(function(i){i.ExplicitPage="explicit-page",i.SlipwayConfig="slipway-config",i.InferredPage="inferred-page",i.None="none"})(ke||(ke={}));var Xn;(function(n){n.Singleton="Singleton",n.ApplicationHost="ApplicationHost",n.DataSource="DataSource"})(Xn||(Xn={}));var Oc;(function(i){i.PENDING="Pending",i.SKIPPED="Skipped",i.FAILED="Failed",i.PASSED="Passed"})(Oc||(Oc={}));var Rc;(function(a){a.SCRIPT_PRESENT="Script Present",a.SCRIPT_LOADED="Script Loaded",a.INTEGRATION_ID_MATCHES="Integration Id Matches",a.PAGE_EVALUATED="Page Evaluated",a.MESSAGING_ACTIVE="Messaging Active"})(Rc||(Rc={}));var Z;(function(i){i.Enabled="Enabled",i.Disabled="Disabled",i.Strict="Strict",i.NotConfigured="NotConfigured"})(Z||(Z={}));function Gt(r){return r?typeof r=="object"&&("integrationId"in r||"clientKey"in r||"apiKey"in r||"identifiers"in r||"type"in r):!1}s(Gt,"isScrapedIdentifiers");function Qn(r){return r&&typeof r=="object"?r.constructor===Date&&!isNaN(r.getTime()):!1}s(Qn,"isDate");function kc(r){if(r===void 0||!r.type)return!1;switch(r.type){case S.RoomsAndRates:return Er(r);case S.Confirmation:return Ws(r);case S.Checkout:return Gp(r);default:return!0}}s(kc,"isPageValid");function Kp(r){return Array.isArray(r)&&r.some(e=>e.price>0&&e.currency)}s(Kp,"hasValidRates");function Up(r){return Qn(r.checkin)&&Qn(r.checkout)&&r.checkin.getTime()0&&typeof r.children=="number"&&r.children>=0}s(Ec,"hasOccupancy");function Bp(r){let{rateDetails:e}=r;return Array.isArray(e)&&e.every(t=>Ec(t))}s(Bp,"hasCapacity");function Er(r){return r&&typeof r=="object"?Up(r)&&(Ec(r)||Bp(r))&&(Kp(r.rateDetails)||["noAvailability","searchInProgress"].includes(r.ratesModified)):!1}s(Er,"isRoomsAndRatesPageData");function Ws(r){return!(r&&typeof r=="object")||typeof r.reference!="string"||["","undefined","null"].includes(r.reference.trim())?!1:r.reservationStatus==="cancelled"||Array.isArray(r.reservations)&&r.reservations.every(e=>e.reservationStatus==="cancelled")?!0:typeof r.price=="number"&&typeof r.currency=="string"}s(Ws,"isConfirmationPageData");function $p(r){return r&&typeof r=="object"?[null,void 0].includes(r.reference)&&typeof r.price=="number"&&typeof r.currency=="string":!1}s($p,"isCheckoutWithBasketPageData");function Gp(r){return Np(r)||$p(r)}s(Gp,"isCheckoutPageData");function Np(r){var e,t;return r&&typeof r=="object"?typeof((e=r.pii)==null?void 0:e.email)=="string"&&Array.isArray((t=r.pii)==null?void 0:t.processingConditions)&&r.pii.processingConditions.length>0&&!q.isEmpty(r.pii.email)&&q.isEmail(r.pii.email):!1}s(Np,"isCheckoutWithEmailPageData");function zp(r){if(r===void 0||!r.type)return!1;switch(r.type){case S.RoomsAndRates:return Mr(r);case S.Confirmation:return Wp(r);case S.Checkout:return Vp(r);default:return!1}}s(zp,"isPartialPage");function Mr(r){return r&&typeof r=="object"?Array.isArray(r.rateDetails)&&r.rateDetails.length>0||!!r.ratesModified:!1}s(Mr,"isPartialRoomsAndRates");function Wp(r){return r&&typeof r=="object"?typeof r.reference=="string"&&!q.isEmpty(r.reference):!1}s(Wp,"isPartialConfirmation");function Vp(r){return r&&typeof r=="object"?typeof r.pii.email=="string"&&!q.isEmpty(r.pii.email):!1}s(Vp,"isPartialCheckout");function Mc(r){let[e]=r.map(y.removeEmpty).filter(zp);if(!!e)return O(g({},e),{type:S.Partial,partialType:e.type})}s(Mc,"findPartial");function Vs(r){let{rateDetails:e}=r;if(!e)return[];let t=e.filter(n=>n.price>0&&!q.isEmpty(n.currency));return A.unique(t.map(n=>n.currency)).length>1?[]:t}s(Vs,"validRates");function Ic(r){let e=new Set;return r.reduce((t,n)=>{let i=B.stringify(n);return e.has(i)||(e.add(i),t.push(n)),t},[])}s(Ic,"deDuplicateRates");function _c(r){var e,t;if(r===void 0||!r.type)return r;switch(r.type){case S.RoomsAndRates:let n=g({},r);return"ratesModified"in n&&n.ratesModified==="noAvailability"&&(n.adults=(e=n.adults)!=null?e:2,n.children=(t=n.children)!=null?t:0),n;default:return r}}s(_c,"addDefaultData");function Jp(r){try{let{target:e,method:t}=Xp(r.type);if(e&&t)return!0}catch(e){}return!1}s(Jp,"isOnboardMessage");var Ir=class{constructor(e,t,n=Yp,i=M("messaging")){this.listener=e;this.allowedOrigins=n;this.logger=i;this.target=this.listener!==t?t:void 0}addListener(e){this.listener&&this.listener.addEventListener("message",t=>{this.disallowedOrigin(t)||!Jp(t.data)||e(t.data,new Ir(void 0,t.source||this.target))})}disallowedOrigin(e){return e.origin&&this.allowedOrigins.length>0&&this.allowedOrigins.indexOf(new N(e.origin).host)===-1}send(e){if(this.target)try{this.target.postMessage(e,"*")}catch(t){this.target.postMessage(JSON.parse(JSON.stringify(e)),"*")}}};s(Ir,"WindowHandler");var Yp=["onboard.triptease.io","localhost"],Zp=/^(.*)\.([^.]+)$/;function Xp(r){let[,e,t]=r.match(Zp)||[];return{target:e,method:t}}s(Xp,"targetAndMethod");function ei(r){let e={};return function(...t){let n=JSON.stringify(t),i=e[n];return typeof i!="undefined"?i:e[n]=r(...t)}}s(ei,"caching");function Qp(r){return r.document.querySelector('iframe[name="triptease.onboard.kernel"]')}s(Qp,"kernelFrame");function Fc(r){let e=Qp(r);if(e&&e.contentWindow)return new Ir(r,e.contentWindow)}s(Fc,"handlerFor");function jc(r){return r&&typeof r=="object"&&"name"in r&&typeof r.name=="string"&&"message"in r&&typeof r.message=="string"&&"stack"in r&&typeof r.stack=="string"}s(jc,"isError");var ti,ef=new Uint8Array(16);function Js(){if(!ti&&(ti=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!ti))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ti(ef)}s(Js,"rng");var Lc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function tf(r){return typeof r=="string"&&Lc.test(r)}s(tf,"validate");var qc=tf;var z=[];for(ri=0;ri<256;++ri)z.push((ri+256).toString(16).substr(1));var ri;function rf(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(z[r[e+0]]+z[r[e+1]]+z[r[e+2]]+z[r[e+3]]+"-"+z[r[e+4]]+z[r[e+5]]+"-"+z[r[e+6]]+z[r[e+7]]+"-"+z[r[e+8]]+z[r[e+9]]+"-"+z[r[e+10]]+z[r[e+11]]+z[r[e+12]]+z[r[e+13]]+z[r[e+14]]+z[r[e+15]]).toLowerCase();if(!qc(t))throw TypeError("Stringified UUID is invalid");return t}s(rf,"stringify");var Hc=rf;function nf(r,e,t){r=r||{};var n=r.random||(r.rng||Js)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(var i=0;i<16;++i)e[t+i]=n[i];return e}return Hc(n)}s(nf,"v4");var Ys=nf;var sf=s(()=>m(()=>crypto.randomUUID())||Ys(),"uuid"),ni=class{generate(e){if(typeof e!="undefined")throw new Error("UuidGenerator does not support custom lengths");return sf().replace(/-/g,"")}};s(ni,"UUIDGenerator");var Zs=class{constructor(e,t){this.messaging=e;this.idGenerator=t}get(e,t,n){return(...i)=>b(this,null,function*(){let a=this.idGenerator.generate(),{payload:o}=yield this.messaging.handle({type:"triptease.onboard.request",requestType:String(t),payload:i,correlationId:a});if(jc(o))throw o;return o})}};s(Zs,"MessageProxy");function ii(r,e=new ni){return new Proxy({},new Zs(r,e))}s(ii,"messageProxy");var si=class{constructor(e,t=ii(e)){this.proxy=t;this.applicationConfig=ei(e=>b(this,null,function*(){return yield this.proxy.applicationConfig(e)}));this.generateClientConfig=ei(e=>b(this,null,function*(){return yield this.proxy.generateClientConfig(e)}));this.generateConfig=ei(e=>b(this,null,function*(){return yield this.proxy.generateConfig(e)}))}};s(si,"KernelProxy");var ai=class{constructor(e,t){this.providers=e;this.logger=t}scrape(){return b(this,null,function*(){return(yield Promise.all(this.providers.map(t=>b(this,null,function*(){try{return this.clean(yield t.scrape())}catch(n){return this.logger.error("Scraper threw error, probable identification failure",n),{}}})))).reduce((t,n)=>g(g({},t),n),{})})}clean(e){let t=y.removeEmpty(e);return t.identifiers&&(t.identifiers=t.identifiers.filter(n=>!!n.identifier).map(n=>y.removeEmpty({identifier:n.identifier.toString().trim(),type:n.type,identifierType:n.identifierType,source:n.source})).filter(n=>!q.isEmpty(n.identifier))),t}};s(ai,"CompositeScraper");function _r(r){if(q.isEmpty(r))return{};if(r.indexOf(":")!==-1){let[e,t]=r.split(":");return{clientKey:e,identifiers:[{identifier:t,type:"Trusted",identifierType:"HotelCode"}]}}return{apiKey:r}}s(_r,"processApiKey");function oi(r){if(!Gt(r))return{};let{integrationId:e,clientKey:t,apiKey:n,identifiers:i,type:a,defaultIdentification:o}=r,c=_r(n);return e&&(c.integrationId=e),t&&(c.clientKey=t),i&&(c.identifiers=i),a&&(c.type=a),o!=null&&(c.defaultIdentification=o),c}s(oi,"processIdentifiers");var Nt=class{constructor(e){this.window=e;this.scripts=new Set}static create(e){let t=de(e).onboard,n=t.stackScriptFinder;return n||(t.stackScriptFinder=new Nt(e))}capture(){let e=of();e&&this.scripts.add(e);let t=this.window.document.currentScript;t&&"src"in t&&this.scripts.add(t.src)}get(){return Array.from(this.scripts).map(e=>new N(e))}};s(Nt,"StackScriptFinder");var af=/(https?.*):\d+:\d+/;function of(){try{throw new Error}catch(r){if(!r.stack)return;let e=r.stack.match(af);return e?e[1]:void 0}}s(of,"rawScript");var Ze=class{static find(e){return this.scripts(e).map(t=>new N(t.src))}static scripts(e){let n=["bootstrap.js","/paperboy/","/identity-service/confirm"].map(a=>`script[src*="${a}"][src*="triptease.io"]`);n.push('script[src*="triptease.net"]');let i=n.join(", ");return e.querySelectorAll(i)}};s(Ze,"ScriptsFinder");var Fr=class{static difference(e,t){return Array.from(e).reduce((n,i)=>t.has(i)?n:n.add(i),new Set)}};s(Fr,"Sets");var jr=M("events"),ci=class{constructor(e,t){this.timers=e;this.handle=t;this.finders=new Set;this.keepers=new Set;this.handleEvent=s(e=>b(this,null,function*(){try{jr.debug("CreatedOrDeletedEvents: Checking for new created items");let t=new Set(Array.from(this.finders).flatMap(a=>a())),n=Fr.difference(t,this.keepers),i=Fr.difference(this.keepers,t);this.keepers=t,(n.size>0||i.size>0)&&(jr.log(`CreatedOrDeletedEvents: ${n.size} created, ${i.size} deleted element detected - firing event`),yield this.handle(e))}catch(t){jr.error("CreatedOrDeletedEvents.handleEvent threw while polling",t)}}),"handleEvent")}start(){return b(this,null,function*(){jr.log("Start polling for created items"),this.id=this.timers.setInterval(this.handleEvent,1e3)})}stop(){return b(this,null,function*(){jr.log("Stop polling for created items"),this.id&&(this.timers.clearInterval(this.id),this.id=void 0)})}watch(e){e().forEach(n=>this.keepers.add(n)),this.finders.add(e)}};s(ci,"CreatedOrDeletedEvents");function Kc(r,e){return()=>Array.from(r.querySelectorAll(e))}s(Kc,"selectorFinder");var cf=Y.getProperty("Date"),li=class{now(){return new cf}};s(li,"NativeClock");var ui=class{now(){return new Date}};s(ui,"SystemClock");function Uc(r){return new Promise(e=>{this.setTimeout(()=>{e()},r)})}s(Uc,"delay");var he=class{constructor(e=new ui){this.clock=e;this.delay=Uc.bind(this);this.delay=Uc}task(e){return b(this,null,function*(){return yield this.delay(0),e()})}setTimeout(e,t){return setTimeout(e,t)}clearTimeout(e){clearTimeout(e)}setInterval(e,t){return setInterval(e,t)}clearInterval(e){clearInterval(e)}requestIdleCallback(e,t){let n=t?t.timeout:1,i=this.clock.now().getTime()+n,a=this;return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining(){return Math.max(0,50-(a.clock.now().getTime()-i))}})},n)}cancelIdleCallback(e){this.clearTimeout(e)}};s(he,"SystemTimers");var Qh=new he;var lf=M("events"),di=class{constructor(e,t){this.window=e;this.delegate=t;this.first=!0;this.fire=s(e=>b(this,null,function*(){if(this.window.document.hidden&&!this.first){lf.log("Document hidden - skipping",e);return}yield this.delegate.fire(e),this.first=!1}),"fire")}listen(e){return b(this,null,function*(){yield this.delegate.listen(e)})}removeListener(e){this.delegate.removeListener(e)}};s(di,"VisibilityGuard");var Xs=M("events"),pi=class{constructor(e,t){this.delegate=e;this.running=t;this.fire=s(e=>b(this,null,function*(){if(this.running.value){Xs.log("Already running - skipping",e);return}this.running.value=!0,yield this.delegate.fire(e),this.running.value=!1}),"fire")}listen(e){return b(this,null,function*(){if(yield this.delegate.listen(e),this.running.value){Xs.log("Already running - firing immediately");try{yield e()}catch(t){Xs.log(t)}}})}removeListener(e){this.delegate.removeListener(e)}};s(pi,"EventsGuard");var Bc=M("events"),fi=class{constructor(){this.handlers=[];this.fire=s(e=>b(this,null,function*(){Bc.log(`Firing handlers(${this.handlers.length})`,e),yield Promise.all(this.handlers.map(t=>b(this,null,function*(){try{yield t()}catch(n){Bc.log("Error while firing handler",n)}})))}),"fire")}listen(e){return b(this,null,function*(){this.handlers.push(e)})}removeListener(e){this.handlers=this.handlers.filter(t=>t!==e)}};s(fi,"EventsMultiplexer");var $c=M("events"),mi=class{constructor(e,t){this.timers=e;this.delegate=t;this.timeoutMs=1e3;this.timerId=0;this.fire=s(e=>b(this,null,function*(){$c.log(`Event observed, waiting for ${this.timeoutMs} ms quiet`,e),this.timers.clearInterval(this.timerId),this.timerId=this.timers.setTimeout(()=>b(this,null,function*(){$c.log("Event quiet period ended, firing event",e),yield this.delegate(e)}),this.timeoutMs)}),"fire")}};s(mi,"EventCollapser");var uf=M("events"),yi=class{constructor(e,t,n=.2,i=new he){this.handle=e;this.running=t;this.idleThreshold=n;this.timers=i;this.lastState=!1;this.busy=!1;this.average=new zt;this.idleHandler=s(e=>{let t=e.timeRemaining();this.running.value?this.busy=!1:t===0?this.busy=!0:(this.average=this.average.calculate(t),this.busy=this.average.percentage<-this.idleThreshold),this.busy?this.idleId=void 0:this.idleId=this.timers.requestIdleCallback(this.idleHandler,t===0?void 0:{timeout:t})},"idleHandler");this.intervalHandler=s(()=>b(this,null,function*(){this.stateHasChanged()&&this.isIdle()&&(uf.log("Browser idle"),yield this.handle("Idle")),this.average=new zt,this.lastState=this.busy,this.idleId||(this.idleId=this.timers.requestIdleCallback(this.idleHandler))}),"intervalHandler")}start(){return b(this,null,function*(){this.intervalId=this.timers.setInterval(this.intervalHandler,1e3),this.idleId=this.timers.requestIdleCallback(this.idleHandler)})}stop(){return b(this,null,function*(){this.intervalId&&this.timers.clearInterval(this.intervalId),this.idleId&&this.timers.cancelIdleCallback(this.idleId)})}isIdle(){return!this.busy}stateHasChanged(){return this.lastState!==this.busy}};s(yi,"IdleEvents");var zt=class{constructor(e=0,t=0,n=0,i=0){this.value=e;this.count=t;this.difference=n;this.percentage=i}calculate(e){let t=this.count+1,n=e-this.value,i=n/this.value,a=this.value+n/t;return new zt(a,t,n,i)}};s(zt,"StreamingAverage");var gi=class{constructor(e,t){this.window=e;this.handle=t}start(){return b(this,null,function*(){this.window.addEventListener("visibilitychange",this.handle),this.window.addEventListener("popstate",this.handle),this.window.addEventListener("hashchange",this.handle),this.window.addEventListener("pageshow",this.handle),this.window.addEventListener("pagehide",this.handle),this.window.document.readyState!=="complete"?this.window.document.addEventListener("DOMContentLoaded",this.handle):yield this.handle("Document already loaded")})}stop(){return b(this,null,function*(){this.window.removeEventListener("visibilitychange",this.handle),this.window.removeEventListener("popstate",this.handle),this.window.removeEventListener("hashchange",this.handle),this.window.removeEventListener("pageshow",this.handle),this.window.removeEventListener("pagehide",this.handle),this.window.document.removeEventListener("DOMContentLoaded",this.handle)})}};s(gi,"WindowEvents");var hi=class{constructor(){this.value=!1}};s(hi,"Running");var Qs=class{constructor(e,t=new he){this.window=e;let n=new hi;this.sink=new di(e,new pi(new fi,n)),this.fire=new mi(t,this.sink.fire).fire,this.mutation=new Wt(this.fire),this.created=new ci(t,this.fire),this.sources=[new yi(this.fire,n),this.mutation,this.created,new gi(e,this.fire)]}watch(e){this.created.watch(e)}listen(e){return b(this,null,function*(){yield this.sink.listen(e)})}start(){return b(this,null,function*(){yield Promise.all(this.sources.map(e=>e.start()))})}stop(){return b(this,null,function*(){this.sources.forEach(e=>e.stop())})}removeListener(e){this.sink.removeListener(e)}};s(Qs,"DefaultEvents");function bi(r){let e=de(r).triptease;return e.events=e.events||new Qs(r)}s(bi,"defaultEvents");var df={characterData:!0,attributes:!0,childList:!0},Wt=class{constructor(e){this.handle=e;this.observer=new MutationObserver(this.handle)}start(){return b(this,null,function*(){})}stop(){return b(this,null,function*(){this.observer.disconnect()})}static observe(e,t=df){if(!("MutationObserver"in ie))return e;let n=bi(ie).mutation;return e instanceof HTMLInputElement||e instanceof HTMLSelectElement?e.addEventListener("change",n.handle):n.observer.observe(e,t),e}};s(Wt,"MutationEvents");function ea(r,e=ie){return m(()=>bi(e).watch(Kc(e.document,r))),r}s(ea,"watch");var Vt=class{constructor(e){this.parent=e}querySelector(e,t){let n=this.parent.querySelector(e);return n||void 0}querySelectorAll(e,t){return Array.from(this.parent.querySelectorAll(e))}};s(Vt,"DomSelectorApi");var be=class{constructor(e){this.parent=e}querySelector(e,t){var i;ea(e,(i=this.parent.ownerDocument)==null?void 0:i.defaultView);let n=this.parent.querySelector(e);return n?Wt.observe(n,t):void 0}querySelectorAll(e,t){var n;return ea(e,(n=this.parent.ownerDocument)==null?void 0:n.defaultView),Array.from(this.parent.querySelectorAll(e)).map(i=>Wt.observe(i,t)).filter(Boolean)}};s(be,"ObservableSelectorApi");var Xe=class{constructor(e){this.window=e}scrape(){let e=Ze.find(new Vt(this.window.document)),t=Nt.create(this.window).get();return Xe.extract([...e,...t])}static extract(e){return y.removeEmpty(e.reduce((t,n)=>{let i=t.integrationId?[t.integrationId]:[],a=t.clientKey?[t.clientKey]:[],o=t.apiKey?[t.apiKey]:[],c=t.identifiers?t.identifiers:[],l=le(n.query,!1),f=Xe.pathClientKey(n);f&&a.unshift(f),l.clientKey&&a.unshift(l.clientKey),i.unshift(l.integrationId);let h=Xe.queryApiKey(l),P=_r(h);P.apiKey&&o.unshift(P.apiKey),P.clientKey&&a.unshift(P.clientKey),P.identifiers&&c.unshift(P.identifiers[0]);let[w]=i.filter(Boolean),[T]=a.filter(Boolean),[J]=o.filter(Boolean),F=c.filter(Boolean);return{integrationId:w,clientKey:T,apiKey:J,identifiers:F}},{}))}static queryApiKey(e){return e.apiKey||e.hotelkey||e.hotelKey||e["api-key"]||e.token}static pathClientKey(e){if(e.host==="paperboy.triptease.net"){let[,n]=e.path.match(/\/+([^/.]+)(?:\.js)?$/)||[];return n}let[,t=""]=e.path.match(/\/paperboy\/+([^/.]+)(?:\.js)?$/)||[];if(t!="paperboy"&&t!="confirm")return t}};s(Xe,"ScriptScraper");function Gc(r,e){if(e){let t=m(()=>r.tt_apiKeys[e])||m(()=>r.ttApiKeys[e])||m(()=>r.document.apiKeys[e])||m(()=>r.document.ttApiKeys[e]);if(t)return ta(t)}return ta(m(()=>r.ttData.apiKey)||r.ttApiKey||r.document.ttApiKey)}s(Gc,"getApiKey");function Nc(r){return ta(r.tt_clientKey||r.document.ttClientKey||r.document.tt_clientKey)}s(Nc,"getClientKey");var pf=["CLIENT_KEY","API_KEY"];function ta(r){if(!!r&&!pf.includes(r))return r}s(ta,"cleanKey");var wi=class{constructor(e){this.window=e}scrape(){let e=Gc(this.window),t=_r(e);return y.removeEmpty(O(g({},t),{clientKey:Nc(this.window)}))}};s(wi,"LegacyScraper");var vi=class{constructor(e){this.pageData=e}scrape(){return oi(this.pageData)}};s(vi,"PageScraper");var ff=M("integration-executor"),Si=class{process(e){var i,a,o;let t=(i=e.reservations)==null?void 0:i.filter(y.isObject).map(c=>g({reservationStatus:"confirmed"},c)),n=O(g({},e),{basePrice:zc(e.price,e.basePrice),reservations:t,reservationStatus:gf(O(g({},e),{reservations:t}))});if(n.rooms=(o=n.rooms)!=null?o:(a=n.reservations)==null?void 0:a.length,n.reservations=hf(n),n.basePrice=n.basePrice||Wc("basePrice",n.reservations,n.currency),n.adults===void 0&&n.children===void 0){let c=mf(n);n.adults=c.adults,n.children=c.children}return y.removeEmpty(n)}};s(Si,"ConfirmationProcessor");function mf(r){return!Array.isArray(r.reservations)||r.reservations.length===0?{}:r.reservations.some(e=>e.adults===void 0||e.children===void 0)?{}:r.reservations.reduce((e,t)=>{var n,i;return e.adults+=(n=t.adults)!=null?n:0,e.children+=(i=t.children)!=null?i:0,e},{adults:0,children:0})}s(mf,"calculateOccupancy");function yf(r,e){return e?r?r>e:!0:!1}s(yf,"isBasePriceValid");function zc(r,e){return yf(r,e)?e:void 0}s(zc,"validatedBasePrice");function gf(r){let{reservationStatus:e,reservations:t}=r;if(e)return e;if(!t||t.length===0)return"confirmed";let n=new Set(t.map(i=>i.reservationStatus));return n.size===1?Array.from(n)[0]:n.has("pending")?"pending":"modified"}s(gf,"calculateReservationStatus");function hf(r){let{reference:e,price:t,currency:n,basePrice:i,reservationStatus:a}=r;if(!r.reservations)return[y.removeEmpty({reference:e,price:t,currency:n,basePrice:i,reservationStatus:a})];let o=r.reservations.map(l=>y.removeEmpty(O(g({},l),{basePrice:zc(l.price,l.basePrice)}))),c=Wc("basePrice",o,r.currency);return c!==void 0&&c===t?bf("basePrice","price",o):o}s(hf,"calculateReservations");function Wc(r,e,t){if(!!t&&e.every(n=>n[r]&&n.currency===t))return e.reduce((n,i)=>i.reservationStatus==="confirmed"?(n!=null?n:0)+i[r]:n,void 0)}s(Wc,"sumOfConfirmedReservations");function bf(r,e,t){return t.every(n=>!n[e])?(ff.log(`Changing label from ${r} to ${e} in reservations`),t.map(n=>y.removeEmpty(O(g({},n),{[e]:n[r],[r]:void 0})))):t}s(bf,"changeLabel");var Jc=E(ne()),xi=E(G());var Lr;(function(n){n.Unknown="Unknown",n.Total="Total",n.Nightly="Nightly"})(Lr||(Lr={}));function Vc(r){return r===!0?Lr.Total:r===!1?Lr.Nightly:Lr.Unknown}s(Vc,"asPriceType");var wf=M("integration-executor"),Di=class{constructor(e,t){this.window=e;this.history=t}process(e){let t=y.removeEmpty(O(g({},e),{type:S.RoomsAndRates}));return t.rateDetails=Ic(Vs(e)),t.ratesModified=this.calculateRatesModified(t),t.priceType=Vc(t.total),t}calculateRatesModified(e){let{ratesModified:t,promoCodes:n}=e;return t||(this.hasRatesChangedWithoutSearchChanging(e)?"roomOrRateFiltered":this.hasSearchChangedWithoutRatesChanging(e)||this.hasCurrencyChangedWithoutPricesChanging(e)?"untrusted":n&&n.length>0?"discountCode":this.window.document.querySelector("html.translated-ltr,html.translated-rtl")?"untrusted":"none")}hasCurrencyChangedWithoutPricesChanging(e){let t=this.history.find(i=>Mr(i));return!((t==null?void 0:t.rateDetails)&&(e==null?void 0:e.rateDetails)&&t.rateDetails.length===e.rateDetails.length&&e.rateDetails.length>0)||!!I.same(Yc(e.rateDetails,"currency"),Yc(t.rateDetails,"currency"))?!1:I.same(ra(Jt(e.rateDetails),"currency"),ra(Jt(t.rateDetails),"currency"))}hasSearchChangedWithoutRatesChanging(e){let t=this.history.find(n=>Mr(n));if(!t)return!1;if(!I.same(Ci(e),Ci(t)))return I.same(Jt(e.rateDetails),Jt(t.rateDetails))}hasRatesChangedWithoutSearchChanging(e){let t=this.history.find(o=>Mr(o));if(!t||!I.same(Ci(e),Ci(t)))return!1;let{rateDetails:n,ratesModified:i}=t;if(i==="roomOrRateFiltered")return!0;if(i==="searchInProgress"||i==="untrusted")return!1;let{rateDetails:a}=e;return!(Vs(t).length===0&&a&&a.length>0||I.isSuperset(Jt(n),Jt(a))||Sf(n,a)||vf(n,a))}};s(Di,"RoomsAndRatesProcessor");function Ci(r){let{apiKey:e,checkin:t,checkout:n,rooms:i,adults:a,children:o,total:c,promoCodes:l,priceComponents:f}=r;return y.removeEmpty({apiKey:e,checkin:t,checkout:n,rooms:i,adults:a,children:o,total:c,promoCodes:l,priceComponents:f})}s(Ci,"searchParameters");function Jt(r){return ra(r,"rateName","roomName","rateCode","roomCode")}s(Jt,"excludeNames");function ra(r,...e){if(!r)return;let t=e.reduce((n,i)=>(n[i]=void 0,n),{});return r.map(n=>y.removeEmpty(g(g({},n),t)))}s(ra,"excludeKeys");function Yc(r,...e){if(!!r)return r.map(t=>y.removeEmpty(e.reduce((n,i)=>(n[i]=t[i],n),{})))}s(Yc,"pickKeys");function vf(r,e){if(r.length===0||e.length===0||r.length!==e.length||r[0].currency===e[0].currency)return!1;let t=(0,Jc.array)(r.map(o=>o.price),(0,xi.zip)(e.map(o=>o.price)),(0,xi.map)(([o,c])=>c/o)),n=Math.min(...t),i=Math.max(...t),a=(i-n)/i;return wf.debug(`Currency changed percentDifference ${a}`),a<.01}s(vf,"currencyChanged");function Zc(r,e){return e.reduce((t,n)=>{let i=n[r];return i&&(t[i]=t[i]===void 0||n.price0&&I.same(i,a))return!0}return!1}s(Sf,"isCollapsed");var Ma=E(Ce()),Gi=E(Ce());function Nl(r,e){return m(()=>Gi.Days.between(Gi.Days.startOf(r),Gi.Days.startOf(e)))}s(Nl,"nights");var Ni=543,zl=2,zi=class{constructor(e,t,n=new li,i=new Di(e,t),a=new Si){this.window=e;this.history=t;this.clock=n;this.roomsAndRatesProcessor=i;this.confirmationProcessor=a}process(e){return this.additionalProcessing((()=>{switch(e.type){case S.RoomsAndRates:return this.roomsAndRatesProcessor.process(e);case S.Confirmation:return this.addDatesFromSearch(this.confirmationProcessor.process(e));case S.Checkout:return this.addOccupancyFromSearch(this.addDatesFromSearch(e));default:return e}})())}additionalProcessing(e){var i,a,o,c,l,f,h,P,w;let t=g({},e);if(Ac(t)){let T=this.clock.now().getFullYear(),J=t.checkin.getFullYear(),F=J-T;Ni-zl<=F&&F<=Ni+zl&&(t.checkin.setFullYear(J-Ni),t.checkout.setFullYear(t.checkout.getFullYear()-Ni)),t.nights=Nl(t.checkout,t.checkin)}"rateDetails"in e&&e.rateDetails.length>0&&(t.rateSummary=hm(e.rateDetails),(o=t.adults)!=null||(t.adults=(a=(i=t.rateSummary)==null?void 0:i.min)==null?void 0:a.adults),(f=t.children)!=null||(t.children=(l=(c=t.rateSummary)==null?void 0:c.min)==null?void 0:l.children),(w=t.rooms)!=null||(t.rooms=(P=(h=t.rateSummary)==null?void 0:h.min)==null?void 0:P.rooms));let n=bm(e.promoCodes);return n&&(t.promoCodes=n),t}addDatesFromSearch(e){let{checkin:t,checkout:n}=e;if(t&&n)return e;let i=this.history.find(a=>a.type===S.RoomsAndRates);return y.removeEmpty(O(g({},e),{checkin:i==null?void 0:i.checkin,checkout:i==null?void 0:i.checkout}))}addOccupancyFromSearch(e){let{adults:t,children:n}=e;if(t!==void 0&&n!==void 0)return e;let i=this.history.find(a=>a.type===S.RoomsAndRates);return y.removeEmpty(O(g({},e),{adults:i==null?void 0:i.adults,children:i==null?void 0:i.children}))}};s(zi,"IntegrationDataProcessor");function hm(r){if(!r||r.length===0)return;let e=[...r].sort((n,i)=>{var a,o;return n.price/((a=n.rooms)!=null?a:1)-i.price/((o=i.rooms)!=null?o:1)}),[t]=e;return{count:r.length,currency:t.currency,min:t,max:A.last(e)}}s(hm,"rateSummary");function bm(r){if(!r)return;let e=new Set(["undefined","null"]);return r.map(t=>t==null?void 0:t.trim()).filter(Boolean).filter(t=>!e.has(t))}s(bm,"validCodes");var Wi=class{constructor(e){this.rules=e}clean(e){return typeof e=="string"?this.rules.reduce((t,n)=>typeof n=="function"?n(t):t.replace(n.search,n.replace),e):Array.isArray(e)?e.map(_e):e&&typeof e=="object"?Object.keys(e).reduce((t,n)=>{let i=e[n];return t[n]=this.clean(i),t},{}):e}};s(Wi,"Cleaner");var Wl=s(r=>r.trim(),"trim"),wm={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"," ":" "},vm=s(function(r){let e="(?:"+Object.keys(r).join("|")+")",t=RegExp(e),n=RegExp(e,"g");return function(i){return t.test(i)?i.replace(n,a=>r[a]):i}},"createEscaper"),Vl=vm(wm),Sm={search:/{{.*}}/g,replace:""},xm={search:/[,.\/#!$%^*;:{}\[\]()=_`~®©™'\u201C\u201D\u2018\u2019]+/g,replace:""},Jl={search:/\s+/g,replace:" "},Dm={search:/\sand\s/gi,replace:" & "},Cm={search:/\s*(?:Image|Logo)\s*/gi,replace:""},Pm={search:/\s*(?:Uniquement\s+Adultes|Adults?\s*(?:Only)\s*)/gi,replace:""},Am={search:/\sAll\sInclusive\s*/gi,replace:""},Tm={search:/\s*[(\[]?Official\s*(?:Hotel)?\s*(?:((?:Web)?Site)|Homepage|booking\s*engine)\s*(?:for|of)?[)\]]?\s*/gi,replace:""},Om={search:/\s&$/,replace:""},Rm=new Wi([Sm,Vl,xm,Jl,Cm,Pm,Am,Tm,Dm,Om,fc,Wl]),Yl=new Wi([Vl,Jl,Wl]);function _e(r){return Rm.clean(r)}s(_e,"clean");function Zl(r){return Object.fromEntries(Object.entries(r).filter(([e,t])=>t!=="undefined"&&t!=="null"))}s(Zl,"cleanValues");function Ia(r){if(r.hasOwnProperty("parentElement"))return r.parentElement;let e=r.parentNode;return e instanceof Element?e:e?Ia(e):null}s(Ia,"parentOf");var km=/^\s*$/,Em=s(r=>r instanceof Text&&km.test(r.data),"isWhiteSpace"),Mm=["script","style","noscript","a"].map(r=>r.toUpperCase()),Im=s(r=>r&&Mm.indexOf(r.tagName)!==-1,"isUninterestingTag"),_m=s(r=>!Em(r)&&!Im(Ia(r)),"isValid");function Vi(r){return r instanceof Element?r:Ia(r)}s(Vi,"elementOf");function Fm(r){let e=Vi(r);if(!!e)return e.getBoundingClientRect()}s(Fm,"clientRectOf");function jm(r,e){let t=e.documentElement.scrollWidth,n=e.documentElement.scrollHeight,i=e.documentElement.scrollLeft,a=e.documentElement.scrollTop;if(t==0||n==0)return;let o=Fm(r);if(!!o)return{x:(o.left+i)/t,y:(o.top+a)/n,width:o.width/t,height:o.height/n}}s(jm,"positionOf");function Lm(r){if(r instanceof Text)return r.data.trim();if(r instanceof Element)return r.getAttribute("aria-label")||r.getAttribute("title")||r.getAttribute("alt")||void 0}s(Lm,"valueOf");function qm(r,e=.8){return r.y0&&r.height>0}s(qm,"isVisibleDefault");function Xl(r,e=qm){let t=r.document,n=[],i=t.createNodeIterator(t.documentElement,NodeFilter.SHOW_TEXT,null);for(;;){let c=i.nextNode();if(!c)break;_m(c)&&n.push(c)}let a=t.querySelectorAll("[aria-label], img[title], img[alt]");for(let c=0;c{let f=Vi(c).compareDocumentPosition(Vi(l));return f&Node.DOCUMENT_POSITION_PRECEDING?1:f&Node.DOCUMENT_POSITION_FOLLOWING?-1:0});let o=[];for(let c=0;c{if(P.length>2&&P.length<93){let w=Vi(l);o.push({source:w?w.tagName.toLowerCase():"",type:"Untrusted",identifierType:"Unknown",identifier:_e(P)})}})}return o}s(Xl,"getDocumentIdentifierSources");var Hm=["context.hotelName","Cart.HName","propertyName","ihReservations.ihHotelName","ihHotelName","HName","transactionHotelName","ratequeryHotelName","hpr","strippedPropertyName","property_name","flipto.sessionData.propertyName","HotelName"];function Km(r){return m(()=>r.event.indexOf("gtm.")===0,!1)}s(Km,"isGtmEvent");function Ql(r){let e=Array.isArray(r)?r:r.dataLayer||[],t=A.safeReverse(e).filter(n=>!Km(n));return Hm.flatMap(n=>A.clean(A.unique(Wn(t,...n.split(".")))).map(i=>({source:"dataLayer."+n,identifier:_e(i),type:"Trusted",identifierType:"HotelName"})))}s(Ql,"dataLayerIdentifiers");var Ji=class{constructor(e,t,n){this.scope=e;this.property=t;this.seed=n}parentScope(e){let[,...t]=zn.path(e);return A.find(t,n=>n.hasAttribute(this.scope))}getValue(e){return e.hasAttribute(this.scope)?this.processScope(e):e.getAttribute("content")||e.getAttribute("src")||e.getAttribute("href")||e.getAttribute("data")||e.getAttribute("value")||e.getAttribute("datetime")||e.textContent}processScope(e){return A.from(e.querySelectorAll(`*[${this.property}]`)).filter(t=>this.parentScope(t)===e).reduce((t,n)=>{let i=n.getAttribute(this.property);return i?Vn(t,i,Yl.clean(this.getValue(n))):t},this.seed(e))}processDocument(e){return new be(e).querySelectorAll(`*[${this.scope}]`).map(this.processScope.bind(this))}};s(Ji,"StructuredDataExtractor");var Um=new Ji("itemscope","itemprop",r=>{let t=(r.getAttribute("itemtype")||"Unknown").split("/");return Yi("microdata",{"@type":t.pop(),"@context":t.join("/")})}),Bm=new Ji("typeof","property",r=>Yi("rdfa",{"@type":r.getAttribute("typeof"),"@context":r.getAttribute("vocab")})),$m={processDocument(r){return A.flatten(new be(r).querySelectorAll('script[type="application/ld+json"]').map(e=>{let n=(e.textContent||"").replace(/[\r\n]/g," ");try{let i=B.parse(n),a=i["@graph"]||i;return Array.isArray(a)?a.map(o=>Yi("json-ld",o)):Yi("json-ld",i)}catch(i){return{"@type":"Error",error:i.toString(),json:n}}}))}};function Yi(r,e){return O(g({},e),{"@format":r})}s(Yi,"addFormat");var ft={processDocument(r){return[...$m.processDocument(r),...Um.processDocument(r),...Bm.processDocument(r)]}};function*eu(r,e){let t=Array.isArray(r)?r:[r];for(let n of t)if(n["@type"]===e)yield n;else for(let i of Object.values(n))zs(i)&&(yield*eu(i,e))}s(eu,"filter");function tu(r,e){let[t]=eu(r,e);return t}s(tu,"find");function Gm(r){if(!!r)return{latitude:Number(r.latitude),longitude:Number(r.longitude)}}s(Gm,"convertGeoCoordinates");function ru(r){let e=Gm(tu(r,"GeoCoordinates")),t=tu(r,"PostalAddress");return t?y.removeEmpty({geo:e,lines:[t.streetAddress,t.addressLocality].filter(Boolean),region:t.addressRegion,postalCode:t.postalCode,country:t.addressCountry}):y.removeEmpty({geo:e})}s(ru,"getAddressFromStructuredData");function tn(r,e){return[...new Zi(_a,"Trusted",e).from(r),...new Zi(iu,"Untrusted",e).from(r)].filter(t=>typeof t.identifier!="object")}s(tn,"getMinimalIdentifiersFromStructuredData");function nu(r,e){let t=ft.processDocument(r).filter(n=>zm.indexOf(n["@type"])!==-1);return tn(t,e)}s(nu,"structuredDataIdentifiers");var Zi=class{constructor(e,t,n=!0){this.orderedStructuredDataTypes=e;this.type=t;this.appendBrand=n}from(e){return A.flatten(this.filterStructuredData(e).map(t=>{let n=(Array.isArray(t.name)?t.name:[t.name]).flatMap(a=>({source:`structuredData[@type='${t["@type"]}'].name`,identifier:_e(this.addBrand(t.brand,a)),type:this.type,identifierType:Wm(t["@type"])})),i=t.identifier;return i&&n.push({type:this.type,identifier:i,source:`structuredData[@type='${t["@type"]}'].identifier`,identifierType:"HotelCode"}),n}))}addBrand(e,t){return!this.appendBrand||!e||t.indexOf(e)>=0?t:`${e} ${t}`}filterStructuredData(e){return e?e.filter(Boolean).filter(t=>this.orderedStructuredDataTypes.indexOf(t["@type"])>=0).filter(t=>Boolean(t.name)).sort((t,n)=>this.orderedStructuredDataTypes.indexOf(t["@type"])-this.orderedStructuredDataTypes.indexOf(n["@type"])):[]}};s(Zi,"StructuredDataSources");var _a=["Hotel","LodgingBusiness","BedAndBreakfast"],iu=["WebSite","LocalBusiness","Organization"],Nm=["HotelRoom","LodgingReservation","Offer","SoftwareApplication"],zm=[..._a,...iu,...Nm];function Wm(r){return _a.includes(r)?"HotelName":"Unknown"}s(Wm,"inferIdentifierTypeFrom");var Fa=E(ne()),cr=E(G());function su(r){return r.identifier&&r.identifier.length>2&&r.identifier.length<110}s(su,"hasSensibleData");var Xi=class{constructor(e,t,n=M("hotel-identifiers-scraper")){this.window=e;this.defaultIdentificationStatus=t;this.logger=n}scrape(){return{identifiers:this.identifierSources()}}identifierSources(){let e=[...nu(this.window.document),...Vm(this.window)].filter(su);if(this.logger.log("Strict identifiers",e),this.defaultIdentificationStatus===Z.Strict)return e;let t=[...Ql(this.window),...Qm(this.window.document),...ty(this.window.document),...Ym(this.window.document),...Xm(this.window)].filter(su);this.logger.log("Common identifiers",t);let n=[...e,...t];if(n.find(i=>Zn.has(i.identifierType)))return n;{let i=Xl(this.window);return this.logger.log("Additional identifiers",i),[...n,...i]}}};s(Xi,"HotelIdentifiersScraper");function rn(r){return r?Gt(r)?!!r.apiKey||!!r.identifiers&&r.identifiers.length>0:Array.isArray(r)?r.reduce((e,t)=>e||rn(t),!1):r.constructor===Object?rn(y.values(r)):!1:!1}s(rn,"hasApiKeyOrIdentifier");function Vm(r,e={host:!0}){if(r===void 0)return[];let{scheme:t,host:n,path:i,query:a}=m(()=>r instanceof N?r:typeof r=="string"?new N(r):new N(r.location.href),{});if(t==="about")return[];let o=e.host===!1?[]:[n,...Jm(au(n))],c=au(i),l=Object.values(le(a,!1)),f=[...o,...c,...l].map(w=>({identifier:w,type:"Untrusted",source:"url",identifierType:"PossibleIdentifier"})),h=(0,Fa.array)(c,(0,cr.windowed)(2,1),(0,cr.map)(([w,T])=>({identifier:[w,T].join("/"),type:"Untrusted",identifierType:"PossibleIdentifier",source:"url"}))),P=(0,Fa.array)(c,(0,cr.windowed)(3,1),(0,cr.map)(([w,T,J])=>({identifier:[w,T,J].join("/"),type:"Untrusted",identifierType:"PossibleIdentifier",source:"url"})));return[...f,...h,...P]}s(Vm,"urlIdentifiers");function au(r){return r?r.split(/[./]/g).filter(Boolean):[]}s(au,"getParts");function Jm(r){return r.filter(e=>e.length>3)}s(Jm,"cleanHosts");function Ym(r){let{HotelCode:e}=Zm(r);return[{identifierType:"PossibleIdentifier",type:"Untrusted",identifier:e,source:"cookie"}]}s(Ym,"cookieIdentifiers");function Zm(r){return m(()=>r.cookie.split(";").reduce((e,t)=>{let[n,i]=t.trim().split("=").map(decodeURIComponent);return e[n]=i,e},{}),{})}s(Zm,"cookieObject");function Xm(r){let e=r.explicitHotelIdentifier;return[{identifierType:"PossibleIdentifier",type:"Untrusted",identifier:e,source:"window"}]}s(Xm,"miscIdentifiers");function Qm(r){return r.title.split(/[|\-:]/).reverse().map(e=>({source:"title",identifier:_e(e),type:"Untrusted",identifierType:"Unknown"}))}s(Qm,"titles");function ey(r){return Array.from(r.getElementsByTagName("meta")).reduce((e,t)=>{let n=t.getAttribute("name")||t.getAttribute("property")||t.getAttribute("http-equiv"),i=t.getAttribute("content");return n&&(e[n]=i),e},{})}s(ey,"metaObject");function ty(r){let e=["site-id","og:title","og:site_name","twitter:title"],t=ey(r);return Object.keys(t).filter(n=>e.indexOf(n)!=-1).map(n=>({source:`meta.${n}`,identifier:_e(t[n]),type:"Untrusted",identifierType:"Unknown"}))}s(ty,"metaLabels");var sy=E(Ce());var ou=E(ne()),cu=E(Q()),rt=E(G());function lu(r){return r?r.trim().split(/[-_]/).filter(Boolean).map((e,t)=>t===0?e.toLowerCase():t===1&&e.length===2?e.toUpperCase():e):[]}s(lu,"localeParts");function ry(r){let[e]=lu(r);return e}s(ry,"languageOf");function ny(r){let e=lu(r);if(e.length!==0)return e.join("-")}s(ny,"cleanLocale");var ja=class{localeOf(e){return[e.documentElement.lang,e.documentElement.getAttribute("xml:lang")].filter(Boolean)}};s(ja,"DocumentLocaleDetector");var La=class{localeOf(e){var n;let t=le((n=e.defaultView)==null?void 0:n.location.search).lang;return typeof t!="string"?[]:[t]}};s(La,"QueryStringLocaleDetector");var lr=class{constructor(e){this.tld=e}static create(e){let[,t]=m(()=>e.defaultView.location.hostname.match(lr.pattern))||[];return new lr(t)}enrich(e){let t=m(()=>lr.mapping[this.tld],this.tld);return t&&lr.validate(`${e}-${t}`)||e}static validate(e){try{let[t]=Intl.DateTimeFormat.supportedLocalesOf(e);return t}catch(t){}}},Qi=lr;s(Qi,"CountryCodeTLDEnricher"),Qi.pattern=/\.(\w{2})$/,Qi.mapping={uk:"GB",co:"US"};function iy(r){if(!r)return!1;if(r==="is"||r==="is-IS")return!0;try{let[e]=Intl.DateTimeFormat.supportedLocalesOf(r);return!!e}catch(e){}return!1}s(iy,"isLocaleValid");var es=class{constructor(){this.detectors=[new La,new ja]}static detectLocale(e){let[t]=es.instance.localeOf(e);return t}localeOf(e){return(0,ou.array)(this.detectors,(0,rt.flatMap)(t=>t.localeOf(e)),(0,rt.map)(ny),(0,rt.filter)(iy),(0,rt.unique)((0,cu.by)(ry)))}},nn=es;s(nn,"SimpleLocaleDetector"),nn.instance=new es;var uu;(function(t){t.rate="rate",t.room="room"})(uu||(uu={}));function sn(r){return nn.detectLocale(r.document)}s(sn,"getLanguageFromDocument");function du(r){return sn(r)||r.navigator.language}s(du,"getLanguageFromDocumentOrBrowser");var ts=class{constructor(e){this.storage=e}get(e){let t=this.storage.getItem(e);if(t)return B.parseWithDates(t)}set(e,t){return this.storage.setItem(e,JSON.stringify(t)),this}clear(){this.storage.clear()}};s(ts,"JsonStorage");var rs=class{constructor(){this.data=new Map}get(e){return this.data.get(e)}set(e,t){return this.data.set(e,t)}clear(){this.data.clear()}};s(rs,"InMemoryTypedStorage");var ns=class{constructor(e){this.stores=e}clear(){this.stores.forEach(e=>m(()=>e.clear()))}get(e){for(let t of this.stores){let n=m(()=>t.get(e));if(n)return n}}set(e,t){return this.stores.forEach(n=>m(()=>n.set(e,t))),this}};s(ns,"CompositeTypedStorage");function pu(r){return b(this,null,function*(){if(typeof crypto!="undefined"&&crypto.subtle&&typeof TextEncoder!="undefined"){let e=new TextEncoder().encode(r),t=yield crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map(i=>i.toString(16).padStart(2,"0")).join("")}else{let e=5381;for(let t=0;tnew ts(e.sessionStorage)),dr.backupStorage]);return new dr(n,t)}storedData(){return oy(this.storage.get(dr.storageKey))||{data:[{type:S.Unknown}],count:0}}data(){return this.storedData().data}add(e){return b(this,null,function*(){let{data:t,count:n}=this.storedData(),i=O(g({},cy(e)),{digest:yield qa(e)});t.unshift(i);let a=Ke.parse(n+1);return this.storage.set(dr.storageKey,{data:mc(t,this.LIMIT),count:a}),a})}last(){let[e]=this.data();return e}find(e){let t=A.find(this.data(),e);if(t){let n=t,{digest:i}=n;return vt(n,["digest"])}}clear(){this.storage.clear()}isSameAsLastGeneration(e){return b(this,null,function*(){let t=this.last();return(t.digest||(yield qa(t)))===(yield qa(e))})}},ur=dr;s(ur,"IntegrationHistory"),ur.storageKey=fu,ur.backupStorage=new rs;function qa(r){return b(this,null,function*(){return yield pu(B.stringify(ay(r)))})}s(qa,"getDigest");function ay(r){if(!r)return{};let e=g({},r);return e.hasOwnProperty("ratesModified")&&e.ratesModified!=="searchInProgress"&&delete e.ratesModified,delete e.stats,e}s(ay,"exclude");function oy(r){if(!!r){if(y.isObject(r)&&"data"in r)return r;if(Array.isArray(r)&&r.every(e=>e.type))return{data:r}}}s(oy,"adapt");function cy(r){let e=g({},r);return delete e.pii,e}s(cy,"scrubData");var Ha=class{reset(){}summarise(){return{}}timeAsync(e,t){return t()}timeCall(e,t){return t}timeSync(e,t){return t()}};s(Ha,"StubReporter");function mu(){return typeof performance=="object"&&"now"in performance?new Ka:new Ha}s(mu,"createReporter");var Ka=class{constructor(e=[],t=new he){this.timings=e;this.timers=t}timeCall(e,t){let n=this;return function(...i){let a=performance.now(),o=t.apply(this,i),c=performance.now()-a;return n.timings.push({name:e,time:c}),o}}timeSync(e,t){let n=performance.now(),i=t(),a=performance.now()-n;return this.timings.push({name:e,time:a}),i}timeAsync(e,t){return b(this,null,function*(){let n=performance.now(),i=yield this.timers.task(t),a=performance.now()-n;return this.timings.push({name:e,time:a}),i})}summarise(){let e=this.timings.reduce((t,{name:n,time:i})=>{let a=t[n]||{count:0,avg:0,sum:0,min:Number.MAX_VALUE,max:Number.MIN_VALUE};return a.count++,a.min=Math.min(a.min,i),a.max=Math.max(a.max,i),a.sum+=i,a.avg+=(i-a.avg)/a.count,t[n]=a,t},{});return this.reset(),e}reset(){this.timings.length=0}};s(Ka,"RealReporter");var yu="triptease.onboard.response";function gu(r){return r&&typeof r=="object"&&r.type==="triptease.onboard.response"&&typeof r.correlationId=="string"}s(gu,"isOnboardResponse");var hu=M("messaging"),is=class{constructor(e){this.messageHandler=e;this.promises=new Map;e&&e.addListener(t=>{if(gu(t)){let{correlationId:n}=t,i=this.promises.get(n);i&&(hu.debug("Sender matched response",t),i.resolve(t),this.promises.delete(n))}})}handle(e){return b(this,null,function*(){return hu.debug("Sending request",e),this.messageHandler&&this.messageHandler.send(e),new Promise((t,n)=>{this.promises.set(e.correlationId,{resolve:t,reject:n})})})}};s(is,"Sender");function bu(r){return y.removeEmpty(O(g({},r),{lines:m(()=>r.lines.filter(Boolean).map(String))}))}s(bu,"cleanAddress");var ss=class{constructor(e,t=60*1e3,n=new he){this.handler=e;this.timeout=t;this.timers=n}handle(e){return b(this,null,function*(){let t=yield Promise.race([this.handler.handle(e),this.timers.delay(this.timeout)]);return t||{type:yu,payload:new Error(`Request ${e.requestType} timed out after ${this.timeout}`),correlationId:e.correlationId}})}};s(ss,"TimeoutMessageHandler");var xu=E(Q());function wu(r){switch(r){case"essential":case"necessary":return"essential";case"functionality":case"personalisation":case"preferences":return"functionality";case"performance":case"statistics":case"analytics":return"performance";case"marketing":case"advertising":return"marketing"}}s(wu,"alias");var as=class{constructor(e){this.window=e}find(){let e=["necessary","preferences","statistics","marketing"].map(t=>m(()=>this.window.Cookiebot.consent[t])?wu(t):void 0).filter(Boolean);if(e.length>0)return{type:"cmp",source:Re.cookieBot,values:e}}};s(as,"CookieBotConsentFinder");var vu=new Set(["all"]);function Su(r){let e=new Set(r.filter(Boolean));return e.size===0||e.has("all")?vu:(e.has("none")&&e.size!==1&&e.delete("none"),e.has("auto")&&e.size!==1&&e.delete("auto"),e)}s(Su,"collapseConsentTypes");var ly=new Map([["ad_storage",["marketing"]],["ad_user_data",["marketing"]],["ad_personalization",["marketing","functionality"]],["analytics_storage",["performance"]],["functionality_storage",["functionality"]],["personalization_storage",["functionality"]],["security_storage",["essential"]]]);function uy(r){return r.filter(t=>t&&t[0]==="consent"&&t[1]==="default").map(t=>t[2]).reduce((t,n)=>(Object.entries(n).forEach(([i,a])=>{t[i]=t[i]==="denied"?"denied":a}),t),{})}s(uy,"mergeDefaultConsentConfigs");var os=class{constructor(e){this.window=e}find(){if(Array.isArray(this.window.dataLayer)){let e=uy(this.window.dataLayer),t=this.window.dataLayer.filter(o=>o&&o[0]==="consent"&&o[1]==="update").reduce((o,c)=>g(g({},o),c[2]),e),i=Object.entries(t).filter(([o,c])=>c==="granted").map(([o])=>o).reduce((o,c)=>{let l=ly.get(c)||[];return[...o,...l]},[]),a=A.unique(i);if(a.length>0)return{type:"cmp",source:Re.google,values:a};if(a.length===0&&Object.keys(t).length>0)return{type:"cmp",source:Re.google,values:["none"]}}}};s(os,"GoogleConsent");var dy={app_basics:"essential",app_preference:"functionality",app_analytics:"performance",app_marketing:"marketing"},cs=class{constructor(e){this.window=e}find(){let{consents:e}=m(()=>this.window.klaro.getManager(),{consents:{}}),t=Object.entries(dy).reduce((n,[i,a])=>e[i]?[...n,a]:n,[]);if(t.length>0)return{type:"cmp",source:Re.klaro,values:t}}};s(cs,"KlaroConsentFinder");var pr=class{constructor(e,t,n){this.window=e;this.key=t;this.parser=n}values(){return this.scripts().map(t=>t.dataset[this.key]).filter(Boolean).flatMap(t=>t.split(/\s*,\s*/g).map(n=>this.parser.parse(n))).filter(t=>!!t)}scripts(){let e=Ze.scripts(new be(this.window.document)),t=e.filter(n=>!n.src.includes("partner="));return t.length>0?t:e}};s(pr,"ScriptAttributeFinder");var ls=class{constructor(e){this.lookup=e.reduce((t,n)=>t.set(n,n),new Map)}parse(e){if(!!e)return this.lookup.get(e.toLowerCase().trim())}};s(ls,"AttributeParser");var us=class extends ls{constructor(){super(["none","first-party","third-party","all"])}};s(us,"StorageControlParser");var ds=class extends ls{constructor(){super(["none","essential","functionality","performance","marketing","all","auto"])}};s(ds,"UserConsentParser");var py=M("consent"),Ua=class extends pr{constructor(e){super(e,"storageConsent",new ds)}find(){let e=this.values();if(e.length>0)return{type:"script",source:"script",values:e}}};s(Ua,"ScriptConsentFinder");var ps=class{constructor(e,t=[new Ua(e),new as(e),new cs(e),new os(e)]){this.finders=t}find(){return this.allConsents.overall}findAll(){return this.allConsents}get allConsents(){let e=this.finders.map(n=>n.find()).filter(Boolean);py.log("individual consents",e);let t=this.getOverallConsent(e);return[...e,t].reduce((n,i)=>{let a=i.type==="overall"?i.type:i.source;return n[a]=i,n},{})}getOverallConsent(e){let t=e.find(i=>i.type==="script"),n=e.find(i=>i.type==="cmp"&&i.values.length>0);return t?t.values.includes("auto")?n?{type:"overall",source:n.source,values:this.cleaned(n.values)}:{type:"overall",source:Re.defaultAutoConsentMode,values:["none"]}:{type:"overall",source:t.source,values:this.cleaned(t.values)}:{type:"overall",source:Re.defaultNoConsentMode,values:["all"]}}cleaned(e){return Array.from(Su(e))}};s(ps,"CompositeConsentFinder");var fs=class extends pr{constructor(e){super(e,"storage",new us)}find(){let e=this.values();if(e.length>0)return{values:e}}};s(fs,"ScriptStorageFinder");var ms=class{constructor(e){this.window=e}scrape(){var a,o;let t=new ps(this.window).findAll(),i=(a=new fs(this.window).find())==null?void 0:a.values;return{userConsent:(o=t.overall)==null?void 0:o.values,consent:t,storage:i}}};s(ms,"UserConsentScraper");var fr=class{constructor(e){this.filteredFeatures=fr.getFeatureFilter(e)}static getFeatureFilter(e){let n=Gs(e,"triptease-features")||"auto",i=m(()=>{let[a]=Ze.find(new Vt(e.document)),{features:o}=le(a.query);return o},n).toLowerCase();return i==="none"||i==="auto"?i:i.split(",").filter(a=>a!=="none"&&a!=="auto")}mergeFeatures(e,t){let n=m(()=>I.merge(e.features||{},(t==null?void 0:t.features)||{}),{});return this.filteredFeatures==="auto"?n:Object.entries(n).reduce((i,[a,o])=>(i[a]=o,this.filteredFeatures.includes(a.toLowerCase())&&(i[a].enabled=!0),this.filteredFeatures==="none"&&(i[a].enabled=!1),i),{})}};s(fr,"DefaultFeatureLoader");function fy(r,e){return b(this,null,function*(){let t=de(r).triptease;M("integration-executor").log(`replaceExecutor old:${m(()=>t.integration.script.app().name)} new:${m(()=>e.script.app().name)}`),t.integration&&(yield t.integration.stop()),t.integration=e,yield e.start()})}s(fy,"replaceExecutor");var ys=class{constructor(e,t,n=bi(e),i=M("integration-executor"),a=de(e).onboard.messageBuilder,o=new ss(new is(Fc(e))),c=new si(o),l=ii(o),f=ur.create(e),h=new zi(e,f),P=new fr(e),w=mu()){this.window=e;this.script=t;this.events=n;this.logger=i;this.messageBuilder=a;this.sender=o;this.kernel=c;this.kernelHost=l;this.history=f;this.processor=h;this.featureLoader=P;this.reporter=w;this.integrate=s(()=>b(this,null,function*(){this.logger.log("Begin integration executor");let e=yield this.reporter.timeAsync("page-scraping",()=>this.findPageData()),t=yield this.reporter.timeAsync("hotel-identification",()=>this.addIdentificationAndAdditionalData(e));t.language||(t.language=du(this.window));let n=this.processor.process(t);this.logger.log("Processed integration data",n);let i=this.lastPath!==this.window.location.pathname,a=!(yield this.history.isSameAsLastGeneration(n)),o=this.kernelMode;this.kernelMode===Xn.ApplicationHost&&(yield this.updateKernelMode());let c=o!==this.kernelMode;if(i||a||c){this.logger.log("Detected change - updating triptease.config",{pathHasChanged:i,integrationDataHasChanged:a,kernelModeHasChanged:c}),this.window.triptease.config=n;let l=yield this.history.add(n);yield this.sendToKernelHost(yield this.messageBuilder.buildMessage({type:"triptease.config",payload:O(g({},gy(n)),{diagnostics:O(g({},n==null?void 0:n.diagnostics),{pathHasChanged:i,integrationDataHasChanged:a,kernelModeHasChanged:c})}),context:{app:this.script.app(),tab:{eventCounter:l},kernelMode:this.kernelMode}})),this.lastPath=this.window.location.pathname}else this.logger.log("No change - doing nothing");return n}),"integrate");fy(e,this)}start(){return b(this,null,function*(){this.logger.log(`IntegrationExecutor.start ${this.script.app().name}`),yield this.events.listen(this.integrate),this.kernelMode=yield this.kernelHost.getKernelMode(),this.logger.log(`IntegrationExecutor's kernel is in ${this.kernelMode} mode`,{href:this.window.location.href})})}stop(){return b(this,null,function*(){this.logger.log(`IntegrationExecutor.stop ${this.script.app().name}`),this.events.removeListener(this.integrate)})}updateKernelMode(e){return b(this,null,function*(){this.kernelMode=e!=null?e:yield this.kernelHost.getKernelMode();let t=e?`updateKernelMode received ${e}`:`updateKernelMode set kernel mode to ${this.kernelMode}`;this.logger.log(t,{href:this.window.location.href})})}addIdentificationAndAdditionalData(e){return b(this,null,function*(){var w,T,J,F,Le,bt,dn,eo,to;let t=yield this.script.scrape(),n=g({},e),i=yield new ai([new ms(this.window),new wi(this.window),new Xe(this.window),{scrape:()=>t},new vi(n)],this.logger).scrape();if(i.apiKey==="none")return this.logger.log('Skipping identification as apiKey is set to "none" - Only interested in page data for ARI feed'),n;if(i=O(g({},i),{type:my(n.type,t.type),integrationName:this.script.app().name}),this.logger.log("all identifiers",i),Er(n)&&Array.isArray(n.rateDetails)){n.rateDetails=this.processArrayPriceComponents(yield this.processArrayIdentifiers(n.rateDetails,i));let Te=this.getUniqueApiKey(n.rateDetails);Te&&(i=O(g({},Ba(i,{identifiers:(T=(w=n==null?void 0:n.rateDetails)==null?void 0:w[0])==null?void 0:T.identifiers})),{apiKey:Te}),n.priceComponents=(F=(J=n==null?void 0:n.rateDetails)==null?void 0:J[0])==null?void 0:F.priceComponents,n.priceComponentsDetails=(bt=(Le=n==null?void 0:n.rateDetails)==null?void 0:Le[0])==null?void 0:bt.priceComponentsDetails)}if(Ws(n)&&Array.isArray(n.reservations)){n.reservations=yield this.processArrayIdentifiers(n.reservations,i);let Te=this.getUniqueApiKey(n.reservations);Te&&(i=O(g({},Ba(i,{identifiers:(eo=(dn=n==null?void 0:n.reservations)==null?void 0:dn[0])==null?void 0:eo.identifiers})),{apiKey:Te}))}this.logger.log("getting client config");let a=yield this.kernel.generateClientConfig(i);this.logger.log("got client config",a);let o=by(i,n,a,this.logger);if(o!==Z.Disabled){let Te=new Xi(this.window,o).scrape();this.logger.log("default identifiers",Te),i=Ba(i,Te),this.logger.log("merged identifiers",i.identifiers)}let c=yield this.kernel.generateConfig(i);this.logger.log("generatedConfig",c);let l=this.featureLoader.mergeFeatures(n,c);this.logger.log("mergeFeatures",l);let f=Du([i,n,c]),h=Er(n)&&Array.isArray(n.rateDetails)&&n.rateDetails.some(Te=>gs(Te.priceComponents)),P=Er(n)&&!h?this.getPriceComponents({priceComponents:n.priceComponents,priceComponentsDetails:n.priceComponentsDetails},(to=c==null?void 0:c.hotelDetails)==null?void 0:to.priceComponents):void 0;return y.removeEmpty(O(g(g(g(g({},i),n),c),P),{features:l,address:bu(yield i.address),defaultIdentification:o,identifiers:this.filterOutPossibleUserData(i),diagnostics:f}))})}getPriceComponents(e,t){var f;let n=gs(e.priceComponents),i=gs((f=e.priceComponentsDetails)==null?void 0:f.priceComponentsInferred),a=gs(t),o=hy(n,a,i),c=a&&i&&I.same([...e.priceComponentsDetails.priceComponentsInferred].sort(),[...t].sort()),l=y.removeEmpty(O(g({},e.priceComponentsDetails),{priceComponentsSource:o,configMatchesInferred:c}));if(o===ke.ExplicitPage){let h={priceComponents:e.priceComponents,priceComponentsDetails:l};return this.logger.log("Using priceComponents from pageData",h),h}if(o===ke.SlipwayConfig){let h={priceComponents:t,priceComponentsDetails:l};return this.logger.log("Using priceComponents from config",h),h}if(o===ke.InferredPage){let h={priceComponents:e.priceComponentsDetails.priceComponentsInferred,priceComponentsDetails:l};return this.logger.log("Using inferred priceComponents from pageData",h),h}return this.logger.log("No priceComponents configuration found"),{priceComponentsDetails:{priceComponentsSource:o}}}filterOutPossibleUserData(e){return m(()=>e.identifiers.filter(t=>Zn.has(t.identifierType)))}getUniqueApiKey(e){let t=A.unique(e.map(n=>n.apiKey));if(t.length===1)return t[0]}processArrayIdentifiers(e,t){return b(this,null,function*(){return yield Promise.all(e.map(n=>b(this,null,function*(){return Gt(n)?g(g({},n),yield this.kernel.generateConfig(g(O(g({},t),{apiKey:void 0}),oi(n)))):n})))})}processArrayPriceComponents(e){return e.map(t=>{var n;return g(g({},t),t.apiKey?this.getPriceComponents({priceComponents:t.priceComponents,priceComponentsDetails:t.priceComponentsDetails},(n=t.hotelDetails)==null?void 0:n.priceComponents):void 0)})}sendToKernelHost(e){return b(this,null,function*(){this.logger.log("Sending triptease.config message to local kernel host",e);let t=O(g({},e),{context:O(g({},e.context),{stats:this.reporter.summarise()})});this.kernelHost.processConfig(t)})}findPageData(){return b(this,null,function*(){let e=[];for(let n of this.script.pages)try{let i=_c(yield n.integrationData());if(i&&(i.pageClass=i.pageClass||yc(n)),kc(i))return this.logger.log("Found valid page",i),i;e.push(i)}catch(i){this.logger.debug("Page didn't parse due to error",i)}this.logger.log("No valid pages found - finding partial page from",e);let t=Du(e);return Mc(e)||y.removeEmpty({type:S.Unknown,diagnostics:t})})}};s(ys,"IntegrationExecutor");function Du(r){if(!!Array.isArray(r))return r.reduce((e,t)=>g(g({},t==null?void 0:t.diagnostics),e),{})}s(Du,"mergeDiagnostics");function my(...r){return A.first([...r,S.Unknown].filter(Boolean).sort((0,xu.by)(Tc)))}s(my,"calculatePageType");function yy(r,e){var t,n;return!!((n=(t=r.features)==null?void 0:t[e])==null?void 0:n.enabled)}s(yy,"isFeatureEnabled");function gy(r){if(!r)return;let e=!yy(r,"CartAbandonment"),t=g({},r);return e&&delete t.pii,t}s(gy,"scrubPII");function Ba(r,e){var t,n;return O(g(g({},r),e),{identifiers:[...(t=r.identifiers)!=null?t:[],...(n=e.identifiers)!=null?n:[]]})}s(Ba,"mergeIdentifiers");function hy(r,e,t){return r?ke.ExplicitPage:e?ke.SlipwayConfig:t?ke.InferredPage:ke.None}s(hy,"getPriceComponentsSource");function gs(r){return r&&r.length>0&&!r.includes(Ue.Unknown)}s(gs,"priceComponentsExists");function by(r,e,t,n=new kr){return r.defaultIdentification===Z.Disabled?(n.log("Default hotel identification set to disabled as requested by integration"),Z.Disabled):r.defaultIdentification===Z.Enabled?(n.log("Default hotel identification set to enabled as requested by integration"),Z.Enabled):(t==null?void 0:t.defaultIdentification)&&t.defaultIdentification!==Z.NotConfigured?(n.log(`Default hotel identification set to ${t.defaultIdentification.toLowerCase()} as requested by client config`),t.defaultIdentification):rn(r)||rn(e)?(n.log("Default hotel identification set to disabled as page data already contains identifiers or apiKey"),Z.Disabled):(n.log("Default hotel identification set to enabled as it is not configured"),Z.Enabled)}s(by,"getDefaultHotelIdentificationStatus");var Cu=E(Pi());var mr=class{static get(){return m(()=>{let e="9929.151752";return e?"v"+e:"latest"})}};s(mr,"Version");var hs=class{constructor(e,t=new Cu.SystemClock){this.window=e;this.clock=t}app(){return{name:m(()=>de(this.window).onboard.integrationName.canonical),version:mr.get()}}address(){return{}}scrape(){return y.removeEmpty({address:m(()=>this.address())})}getDefaultIdentification(e){return e.length>0?Z.Disabled:Z.NotConfigured}};s(hs,"Integration");var Au=E(Ce());var Pu="triptease-managed";var Tu=E(Ce());var bs=class{constructor(e,t=new be(e.document),n=(0,Tu.numberParser)("."),i=(0,Au.parser)("en","yyyy-MM-dd")){this.window=e;this.selectorApi=t;this.numParser=n;this.dateParser=i}integrationData(){let e=this.selectorApi.querySelectorAll(`.price-fighter-widget:not(.${Pu})`);if(e.length===0)return;let t=e.map(i=>this.cleanData(i)),n=this.createSetsFrom(t);return n.hasUnique("apiKey")||n.hasUnique("propertyCode")?this.singleHotel(t[0]):this.multipleHotels(t,n)}cleanData(e){let T=wy(e.dataset),{clientkey:t,property:n,token:i,hotelkey:a,directPrice:o,roomRate:c,roomType:l}=T,f=vt(T,["clientkey","property","token","hotelkey","directPrice","roomRate","roomType"]),h=a||i;return g({clientKey:t||(n?h:void 0),apiKey:n?void 0:h,propertyCode:n,price:o,roomName:l,rateName:c},f)}createSetsFrom(e){return e.reduce((t,n)=>y.entries(n).reduce((i,[a,o])=>i.add(a,o),t),new $a)}singleHotel(e){let t=e.propertyCode?[{identifier:e.propertyCode,identifierType:"HotelCode",type:"Trusted",source:"pf-div"}]:[],n=e.loggedIn==="true"?"untrusted":"none",i=y.removeEmpty({price:m(()=>this.numParser.parse(e.price)),currency:e.currency,rateName:e.rateName,roomName:e.roomName});return y.removeEmpty({type:S.RoomsAndRates,pageClass:"SelfIntegratedRoomsAndRates",language:e.language,clientKey:e.clientKey,apiKey:e.apiKey,identifiers:t,adults:m(()=>this.numParser.parse(e.adults)),children:m(()=>this.numParser.parse(e.children)),rooms:m(()=>this.numParser.parse(e.rooms)),checkin:m(()=>this.dateParser.parse(e.checkin)),checkout:m(()=>this.dateParser.parse(e.checkout)),total:this.getTotal(e.total),layout:Ou(e.layout),ratesModified:n,rateDetails:!!i.price&&!!i.currency?[i]:[]})}getTotal(e){let t=m(()=>e.toLowerCase());if(t==="true")return!0;if(t==="false")return!1}multipleHotels(e,t){let n=t.get("total"),i=e.reduce((a,o)=>a||o.loggedIn==="true",!1)?"untrusted":"none";return y.removeEmpty({type:S.RoomsAndRates,pageClass:"SelfIntegratedRoomsAndRates",language:t.get("language"),clientKey:m(()=>t.get("clientKey")),adults:m(()=>this.numParser.parse(t.get("adults"))),children:m(()=>this.numParser.parse(t.get("children"))),rooms:m(()=>this.numParser.parse(t.get("rooms"))),checkin:m(()=>this.dateParser.parse(t.get("checkin"))),checkout:m(()=>this.dateParser.parse(t.get("checkout"))),total:this.getTotal(n),layout:Ou(t.get("layout")),ratesModified:i,rateDetails:e.map(a=>{let o=a.propertyCode?[{identifier:a.propertyCode,type:"Trusted",identifierType:"HotelCode"}]:[];return y.removeEmpty({clientKey:a.clientKey,apiKey:a.apiKey,identifiers:o,price:m(()=>this.numParser.parse(a.price)),currency:a.currency,rateName:a.rateName,roomName:a.roomName})})})}};s(bs,"SelfIntegratedRoomsAndRates");function wy(r){return Object.keys(r).reduce((e,t)=>{let n=t.replace(/^pf/,"");return O(g({},e),{[`${n[0].toLowerCase()}${n.slice(1)}`]:r[t]})},{})}s(wy,"cleanNames");function Ou(r){if(!!r)return r.toLowerCase().replace("-","")}s(Ou,"cleanLayout");var $a=class{constructor(){this.sets={}}hasUnique(e){let t=this.sets[e];return t?t.size===1:!1}add(e,t){return t?(this.sets[e]=this.sets[e]||new Set,this.sets[e].add(t),this):this}get(e){let t=this.sets[e];if(t.size===1)return A.from(t)[0]}};s($a,"Sets");var Ru=E(Ce());var ws=class{constructor(e,t=new be(e.document),n=(0,Ru.numberParser)(".")){this.window=e;this.selectorApi=t;this.parser=n}integrationData(){let e=this.selectorApi.querySelectorAll('script[src*="triptease"]').map(t=>new N(t.src));return y.removeEmpty(e.reduce((t,n)=>{let i=Zl(le(n.query,!1));return{type:S.Confirmation,price:i.bookingValue?this.parser.parse(i.bookingValue):t.price,currency:i.bookingCurrency?i.bookingCurrency:t.currency,reference:i.bookingReference?i.bookingReference:t.reference,basePrice:i.basePrice?this.parser.parse(i.basePrice):t.basePrice,checkin:i.checkin?new Date(i.checkin):t.checkin,checkout:i.checkout?new Date(i.checkout):t.checkout}},{}))}};s(ws,"SelfIntegratedConfirmation");var zu=E(ce());var Wu=E(Ce());var Gu=E(ce()),Nu=E(Xa());var ln=class{constructor(e){this.locale=e}getMoneyParser(e,t){return(0,Nu.implicitMoneyParser)({currency:t,locale:e})}convert(e){return e.flatMap(t=>{var o,c,l,f;let n=(o=t.priceSpecification)==null?void 0:o.priceCurrency,i=this.getMoneyParser(this.locale,n),[a]=i.parseAll(String((c=t.priceSpecification)==null?void 0:c.price));return a?[y.removeEmpty({price:a.amount,currency:n,rateName:t.name,rateCode:t.identifier,roomName:(l=t.itemOffered)==null?void 0:l.name,roomCode:(f=t.itemOffered)==null?void 0:f.identifier,identifiers:tn([t==null?void 0:t.offeredBy])})]:[]})}};s(ln,"OffersToRateDetailsConverter"),qe([Gu.cache],ln.prototype,"getMoneyParser",1);var hr=class{constructor(e){this.window=e;this.dateParser=(0,Wu.parser)("en","yyyy-MM-dd")}getOfferConverter(e){return new ln(e)}find(e){return{search:A.find(e,t=>t["@type"]==="LodgingSearch"),offers:e.filter(t=>t["@type"]==="Offer"),offerCatalog:A.find(e,t=>t["@type"]==="OfferCatalog")}}convert({search:e,offers:t,offerCatalog:n}){let i=sn(this.window),a=this.getOfferConverter(i).convert(t);return y.removeEmpty({type:S.RoomsAndRates,language:i,pageClass:"StructuredDataRoomsAndRates",checkin:this.parseDate(e==null?void 0:e.checkinTime),checkout:this.parseDate(e==null?void 0:e.checkoutTime),adults:m(()=>Ke.parse(e.numAdults),2),children:m(()=>Ke.parse(e.numChildren),0),rooms:m(()=>Ke.parse(e.numRooms),1),rateDetails:a,ratesModified:m(()=>Ke.parse(n.numberOfItems)===0)?"noAvailability":void 0,total:m(()=>this.getTotal(t[0].priceSpecification.unitText)),priceComponents:m(()=>Hy(t[0].priceSpecification)),promoCodes:(Array.isArray(e==null?void 0:e.offerCode)?e==null?void 0:e.offerCode:[e==null?void 0:e.offerCode]).filter(Boolean)})}getTotal(e){let t=m(()=>e.toLowerCase().trim());if(t==="total")return!0;if(t==="nightly")return!1}parseDate(e){return m(()=>this.dateParser.parseAll(e.split("T")[0])[0])}};s(hr,"StructuredDataRoomsAndRates"),qe([zu.cache],hr.prototype,"getOfferConverter",1);function Hy(r){if(!Array.isArray(r==null?void 0:r.priceComponentType))return[];let e=[Ue.Room,Ue.Fee,Ue.Tax].map(t=>r.priceComponentType.find(n=>n===t)).filter(Boolean);return e[0]!==Ue.Room?[]:e.length===r.priceComponentType.length?e:[]}s(Hy,"getStructuredDataPriceComponents");var Qa=E(_s()),Ps=E(G());var Vu=E(ne()),Ju=E(ce()),Yu=E(Xa());var Zu=E(Ce());var br=class{constructor(e){this.window=e;this.dateParser=(0,Zu.parser)("en","yyyy-MM-dd");this.lookup={["http://schema.org/ReservationConfirmed"]:"confirmed",["http://schema.org/ReservationCancelled"]:"cancelled",["http://schema.org/ReservationPending"]:"pending",["https://schema.org/ReservationConfirmed"]:"confirmed",["https://schema.org/ReservationCancelled"]:"cancelled",["https://schema.org/ReservationPending"]:"pending"}}getMoneyParser(e,t){return(0,Yu.implicitMoneyParser)({currency:t,locale:e})}find(e){return e.filter(t=>Pc(t)&&this.lookup[t.reservationStatus])}convert(e){let t=sn(this.window),n=(0,Vu.array)(e,(0,Ps.map)(f=>{let h=f.priceCurrency,P=this.getMoneyParser(t,h);return y.removeEmpty({reference:f.reservationId,price:m(()=>P.parse(String(f.totalPrice)).amount),basePrice:m(()=>P.parse(String(f.basePrice)).amount),currency:h,reservationStatus:this.lookup[f.reservationStatus],identifiers:tn([f==null?void 0:f.provider])})}),(0,Ps.unique)((f,h)=>I.same(f,h)?0:1)),[i]=e,{checkinTime:a,checkoutTime:o,priceCurrency:c,offerCode:l}=i;return y.removeEmpty({type:S.Confirmation,language:t,pageClass:"StructuredDataConfirmation",checkin:this.parseDate(a),checkout:this.parseDate(o),currency:c,reference:n.map(f=>f.reference).sort().join(","),price:n.map(f=>f.price).reduce(Qa.sum),basePrice:n.map(f=>f.basePrice).reduce(Qa.sum),reservations:n,promoCodes:[l!=null?l:[]].flat()})}parseDate(e){return m(()=>this.dateParser.parseAll(e.split("T")[0])[0])}};s(br,"StructuredDataConfirmation"),qe([Ju.cache],br.prototype,"getMoneyParser",1);var it=class{constructor(e,t=[new br(e),new hr(e)]){this.window=e;this.converters=t;this.logger=M("structured-data")}static confirmation(e){return new it(e,[new br(e)])}static roomsAndRates(e){return new it(e,[new hr(e)])}integrationData(){let e=ft.processDocument(this.window.document);for(let t of this.converters)try{let n=t.find(e);if(!n)continue;return t.convert(n)}catch(n){}this.logger.log(`${this.converters.length} converters were unable to process structured data`,{structuredData:e})}};s(it,"StructuredDataPage");var Ky=mr.get();function Uy(r){return`https://onboard.triptease.io/integrations/${Ky}/${r}.js`}s(Uy,"onboard");function un(r){return typeof r!="string"?"":r.split(/[^A-Za-z0-9-]/)[0].replace(/-/g,"").toLowerCase()}s(un,"cleanName");var p;(function(i){i.Standard="Standard",i.Custom="Custom",i.Marketing="Marketing",i.Internal="Internal"})(p||(p={}));var u=class{constructor(e,t){this.name=e;this.type=t;if(!/[A-Za-z0-9]/.test(e))throw new Error("Only alpha numeric allowed");u.Lookup.set(un(e),this)}static values(){return Array.from(u.Lookup.values())}static parse(e){let t=u.Lookup.get(un(e));if(!t)throw new Error(`Invalid booking engine name: ${e}`);return t}toString(){return this.name}get canonical(){return un(this.name)}get folder(){return this.isSelfIntegration()?u.Default.folder:q.kebabCase(this.name)}get script(){return Uy(this.folder)}isSelfIntegration(){return u.SelfIntegration.has(this)}},d=u;s(d,"IntegrationName"),d.Lookup=new Map,d.AboveProperty=new u("AboveProperty",p.Standard),d.AfricaAlbida=new u("AfricaAlbida",p.Custom),d.Alaric=new u("Alaric",p.Standard),d.Ascott=new u("Ascott",p.Custom),d.ASIWebRes=new u("ASIWebRes",p.Standard),d.AtlantisORS=new u("AtlantisORS",p.Standard),d.Auberge=new u("Auberge",p.Marketing),d.AvailPro=new u("AvailPro",p.Standard),d.Avvio=new u("Avvio",p.Standard),d.Ayana=new u("Ayana",p.Custom),d.AZDS=new u("AZDS",p.Standard),d.BanyanTree=new u("BanyanTree",p.Marketing),d.BestWesternFrance=new u("BestWesternFrance",p.Custom),d.BestWesternItaly=new u("BestWesternItaly",p.Custom),d.BestWesternUk=new u("BestWesternUk",p.Custom),d.Betsy=new u("Betsy",p.Custom),d.Bloom=new u("Bloom",p.Custom),d.BookAssist=new u("BookAssist",p.Standard),d.BookEasy=new u("BookEasy",p.Standard),d.Bookolo=new u("Bookolo",p.Standard),d.BookOnlineNow=new u("BookOnlineNow",p.Standard),d.BookVisit=new u("BookVisit",p.Standard),d.Booking=new u("Booking"),d.Booking2Hotels=new u("Booking2Hotels",p.Standard),d.BookingExpert=new u("BookingExpert",p.Standard),d.BrochnerHotels=new u("BrochnerHotels",p.Custom),d.BusyRooms=new u("BusyRooms",p.Standard),d.BWHHotelGroup=new u("BWHHotelGroup",p.Custom),d.CenterHotels=new u("CenterHotels",p.Custom),d.CityExpress=new u("CityExpress"),d.Clink=new u("Clink",p.Custom),d.Clock=new u("Clock",p.Standard),d.CloudBeds=new u("CloudBeds",p.Standard),d.Cocotel=new u("Cocotel",p.Custom),d.CompuRez=new u("CompuRez",p.Standard),d.Comwell=new u("Comwell"),d.ConstanceHotels=new u("ConstanceHotels",p.Custom),d.Default=new u("Default",p.Internal),d.DerqueBooking=new u("DerqueBooking"),d.DeutscheHospitality=new u("DeutscheHospitality"),d.Dingus=new u("Dingus",p.Standard),d.Dirs21=new u("Dirs21",p.Standard),d.DoyleCollection=new u("DoyleCollection",p.Custom),d.EasyBooking=new u("EasyBooking"),d.EasyConsulting=new u("EasyConsulting"),d.Erez=new u("Erez",p.Standard),d.EGds=new u("EGds",p.Standard),d.Evancy=new u("Evancy",p.Custom),d.Exely=new u("Exely",p.Standard),d.Everly=new u("Everly",p.Custom),d.Eviivo=new u("Eviivo",p.Standard),d.ExtendedStayAmerica=new u("ExtendedStayAmerica",p.Custom),d.Ezee=new u("Ezee",p.Standard),d.FastBooking=new u("FastBooking",p.Standard),d.Firmdale=new u("Firmdale",p.Custom),d.FourSeasons=new u("FourSeasons",p.Custom),d.FrontDeskMaster=new u("FrontDeskMaster",p.Standard),d.FullertonHotels=new u("FullertonHotels",p.Custom),d.Furama=new u("Furama",p.Custom),d.GemHotels=new u("GemHotels",p.Custom),d.Generic=new u("Generic",p.Internal),d.GHS=new u("GHS",p.Standard),d.GlenEagles=new u("GlenEagles"),d.GuestCentric=new u("GuestCentric",p.Standard),d.GuestDesk=new u("GuestDesk",p.Standard),d.GuestLine=new u("GuestLine",p.Standard),d.GuestPro=new u("GuestPro",p.Standard),d.GuestRez=new u("GuestRez"),d.Guild=new u("Guild"),d.HamiltonIsland=new u("HamiltonIsland",p.Custom),d.HamiltonIslandHolidayHomes=new u("HamiltonIslandHolidayHomes",p.Custom),d.HandPickedHotels=new u("HandPickedHotels",p.Custom),d.Hart=new u("Hart",p.Standard),d.HHotels=new u("HHotels",p.Custom),d.HighLevelSoftware=new u("HighLevelSoftware",p.Standard),d.Hipotels=new u("Hipotels",p.Custom),d.HiUsa=new u("HiUsa",p.Custom),d.HotelChamp=new u("HotelChamp",p.Standard),d.Hoteliers=new u("Hoteliers",p.Standard),d.HoteliersGuru=new u("HoteliersGuru",p.Standard),d.HotelKeyApp=new u("HotelKeyApp",p.Standard),d.HotelNetSolutions=new u("HotelNetSolutions",p.Standard),d.HotelPartner=new u("HotelPartner",p.Standard),d.Hotetec=new u("Hotetec",p.Standard),d.Hotusa=new u("Hotusa",p.Standard),d.Hoxton=new u("Hoxton",p.Custom),d.HspRez=new u("HspRez",p.Standard),d.HtiSystems=new u("HtiSystems",p.Standard),d.Hyatt=new u("Hyatt",p.Custom),d.Iberostar=new u("Iberostar",p.Custom),d.Infotera=new u("Infotera",p.Standard),d.Inkaterra=new u("Inkaterra",p.Custom),d.InnQuest=new u("InnQuest",p.Standard),d.InnRoad=new u("InnRoad",p.Standard),d.InnStyle=new u("InnStyle"),d.Inntopia=new u("Inntopia",p.Standard),d.Iperbooking=new u("Iperbooking"),d.IRM=new u("IRM",p.Standard),d.JazHotels=new u("JazHotels",p.Custom),d.Journey=new u("Journey",p.Standard),d.JustBestBooking=new u("JustBestBooking",p.Standard),d.Kasa=new u("Kasa",p.Custom),d.KeaHotels=new u("KeaHotels",p.Custom),d.Kempinski=new u("Kempinski"),d.Kerzner=new u("Kerzner",p.Custom),d.LatourHotelsAndResorts=new u("LatourHotelsAndResorts",p.Custom),d.LHW=new u("LHW",p.Custom),d.LifeHouse=new u("LifeHouse",p.Custom),d.Loews=new u("Loews",p.Custom),d.Lotte=new u("Lotte",p.Custom),d.LumaHotels=new u("LumaHotels",p.Custom),d.Luxscapia=new u("Luxscapia",p.Standard),d.McDreams=new u("McDreams",p.Custom),d.Mews=new u("Mews",p.Standard),d.MgmResorts=new u("MgmResorts",p.Custom),d.MillenniumHotels=new u("MillenniumHotels",p.Custom),d.MinorHotels=new u("MinorHotels",p.Standard),d.Mirai=new u("Mirai",p.Standard),d.MotelOne=new u("MotelOne",p.Custom),d.Namastay=new u("Namastay",p.Standard),d.NativePlaces=new u("NativePlaces"),d.NeoBookings=new u("NeoBookings",p.Standard),d.NetAffinity=new u("NetAffinity",p.Standard),d.Newbook=new u("Newbook",p.Standard),d.NHHotels=new u("NHHotels"),d.Nightsbridge=new u("Nightsbridge",p.Standard),d.OKU=new u("OKU",p.Custom),d.OmegaHotelManagement=new u("OmegaHotelManagement",p.Custom),d.Omnibees=new u("Omnibees",p.Standard),d.OneHotels=new u("OneHotels",p.Standard),d.Opera=new u("Opera",p.Standard),d.OpenHotel=new u("OpenHotel",p.Standard),d.P3=new u("P3",p.Standard),d.PalaceResorts=new u("PalaceResorts"),d.PanHospitality=new u("PanHospitality",p.Standard),d.Paraty=new u("Paraty",p.Standard),d.Pegasus=new u("Pegasus",p.Standard),d.Pelican=new u("Pelican",p.Standard),d.Phobs=new u("Phobs",p.Standard),d.Planet=new u("Planet",p.Standard),d.PointAHotels=new u("PointAHotels",p.Custom),d.Prestige=new u("Prestige",p.Standard),d.ProfitRoom=new u("ProfitRoom",p.Standard),d.Protel=new u("Protel",p.Standard),d.PursuitCollection=new u("PursuitCollection",p.Custom),d.RedPlanet=new u("RedPlanet",p.Custom),d.RegalHotels=new u("RegalHotels",p.Custom),d.ReserveHotel=new u("ReserveHotel",p.Standard),d.ReserveOnline=new u("ReserveOnline",p.Standard),d.ReservationResources=new u("ReservationResources",p.Standard),d.Reservit=new u("Reservit",p.Standard),d.Reseze=new u("Reseze",p.Standard),d.ResNexus=new u("ResNexus",p.Standard),d.ResOnTheWeb=new u("ResOnTheWeb",p.Standard),d.Retargeting=new u("Retargeting",p.Internal),d.Revenatium=new u("Revenatium",p.Standard),d.Reztrip=new u("Reztrip",p.Standard),d.RGuest=new u("RGuest",p.Standard),d.RMSCloud=new u("RMSCloud",p.Standard),d.Roiback=new u("Roiback",p.Standard),d.RoomKey=new u("RoomKey",p.Standard),d.RoomMaster=new u("RoomMaster",p.Standard),d.RoomSome=new u("RoomSome",p.Standard),d.RoomStay=new u("RoomStay",p.Standard),d.SandsVegas=new u("SandsVegas",p.Custom),d.Sandrix=new u("Sandrix",p.Standard),d.Sbe=new u("Sbe",p.Standard),d.SeamillHydro=new u("SeamillHydro",p.Custom),d.Seekda=new u("Seekda",p.Standard),d.Selfbook=new u("Selfbook",p.Standard),d.Shr=new u("Shr",p.Standard),d.SimpleBooking=new u("SimpleBooking",p.Standard),d.SiteMinder=new u("SiteMinder",p.Standard),d.Skipper=new u("Skipper",p.Standard),d.Skyware=new u("Skyware",p.Standard),d.Staah=new u("Staah",p.Standard),d.StationCasinos=new u("StationCasinos",p.Custom),d.Stayntouch=new u("Stayntouch",p.Standard),d.Sweett=new u("Sweett",p.Custom),d.Synxis=new u("Synxis",p.Standard),d.SysHotelOnline=new u("SysHotelOnline",p.Standard),d.Taj=new u("Taj",p.Custom),d.ThinkReservations=new u("ThinkReservations",p.Standard),d.Travelanium=new u("Travelanium",p.Standard),d.TravelClick=new u("TravelClick",p.Standard),d.Uibscrs=new u("Uibscrs",p.Standard),d.Up=new u("Up",p.Standard),d.VacationMarbella=new u("VacationMarbella",p.Custom),d.Valamar=new u("Valamar",p.Custom),d.VandervalkOnline=new u("VandervalkOnline",p.Custom),d.VerticalBooking=new u("VerticalBooking",p.Standard),d.Viato=new u("Viato",p.Standard),d.Vinpearl=new u("Vinpearl",p.Custom),d.WebRezPro=new u("WebRezPro",p.Standard),d.WestCordHotels=new u("WestCordHotels",p.Custom),d.Witbooking=new u("Witbooking",p.Standard),d.Youngs=new u("Youngs",p.Custom),d.Zafiro=new u("Zafiro",p.Custom),d.SelfIntegration=new Set([u.Dirs21,u.HtiSystems,u.ExtendedStayAmerica]);function By(r){return m(()=>{let i=r.find(a=>a["@type"]==="SoftwareApplication"),{name:e,version:t}=i,n=vt(i,["name","version"]);return g({name:un(e),version:String(t)},y.filter(n,a=>!q.startWith(a,"@")))},{})}s(By,"getAppNameAndVersion");var As=class extends hs{constructor(){super(...arguments);this.pages=[it.confirmation(this.window),new ws(this.window),it.roomsAndRates(this.window),new bs(this.window)]}app(){let e=ft.processDocument(this.window.document),t=By(e);return t.name?t:super.app()}address(){let e=ft.processDocument(this.window.document);return ru(e)}};s(As,"Default");new ys(window,new As(window));})();